The same issue happens from time to time in Visual Studio 2022. I just open the web.config, save it, and close the editor tab.
This fixes the issue for me.