You did not mention which version of Blazor you are using or source code so we have no idea how your code works. However, your question is related to state management and Blazor has tools for managing state. See the following reference documentation. Be sure to pick the Blazor version you are using.
ASP.NET Core Blazor state management
If you are still having problems after reading the official documentation, then share sample code that illustrates this problem. Explain the expected results and the actual results.