Index: src/wp-includes/link-template.php
===================================================================
--- src/wp-includes/link-template.php	(revision 49123)
+++ src/wp-includes/link-template.php	(working copy)
@@ -452,6 +452,8 @@
 	 * Filters the permalink for an attachment.
 	 *
 	 * @since 2.0.0
+	 * @since 5.6.0 Providing an empty string will now disable 
+	 * the view attachment page link on the media modal.
 	 *
 	 * @param string $link    The attachment's permalink.
 	 * @param int    $post_id Attachment ID.
Index: src/wp-includes/media-template.php
===================================================================
--- src/wp-includes/media-template.php	(revision 49123)
+++ src/wp-includes/media-template.php	(working copy)
@@ -511,11 +511,19 @@
 			</div>
 
 			<div class="actions">
-				<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
-				<# if ( data.can.save ) { #> |
+				<# if ( data.link ) { #>
+					<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
+				<# } #>
+				<# if ( data.can.save ) { #>
+					<# if ( data.link ) { #>
+						<span class="links-separator">|</span>
+					<# } #>
 					<a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a>
 				<# } #>
-				<# if ( ! data.uploading && data.can.remove ) { #> |
+				<# if ( ! data.uploading && data.can.remove ) { #>
+					<# if ( data.link || data.can.save ) { #>
+						<span class="links-separator">|</span>
+					<# } #>
 					<?php if ( MEDIA_TRASH ) : ?>
 						<# if ( 'trash' === data.status ) { #>
 							<button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>
