Yes, this is a known issue in Blazor. You can track the issue link on Github.
This is how to prevent an href in an anchor tag and call an onclick event. [Work Around]
<a href="https://www.youtube.com/watch?v=kX4oRfj1Ip8" class="btn btn-primary" @onclick="@TheEvent" @onclick:preventDefault>Do it</a>