This is the normal and expected behavior. The “strange” part is that you need to press Esc and F5 for this to work.
There is a recent bug report on GitHub, which might be related. Please take a look, and submit your own observations there if you think the thread is relevant to your experience:
Is the URL for the page that triggers the Basic Auth prompt identical (character for character) to the URL for the “standard” (non-basic) login prompt? If not, you can solve the problem by using two separate vault items and strict URI match detection rules. If the two URLs are identical, then it will be difficult to solve the problem, because your Basic Auth login will stop working if there is a second vault item that matches. I might be able to suggest a work-around if that is the case — please let me know.