The problem was with the web.js library.
I changed the app.razor rendering mode to InteractiveWebAssemblyRenderMode(prerender:false)
Changing <script src=“_framework/blazor.web.js”></script>
to
<script src=“_framework/blazor.webassembly.js”></script>
helped me solve the problem.
enter image description here