It happened to me when I was creating a new Web Form by copying and pasting. I tried deleting the Temporary ASP.NET Files, Rebuilding the Solution, Rebuilding the Website, and closing VS2022 (opened as ADMIN), but none of them worked.
In my case, I had to delete the ASPX and ASPX.VB files and recreate them. Then, I coded without copying and pasting, and it worked.