In Gutenberg, it works, but why like this? In my case I have a lots of pdf documents in the media library.
It’s so tedious now, the emphasis is on knowing the URL before you start, rather than realising whilst writing that you want a link & being able to easily call up the media library without even caring what the URL is.
Using the ‘classic’ block now, which seems ok.
Anyway, just a comment & black mark against WP unless you can convince me otherwise.