I had the same issue with Visual Studio 2022, with a winforms project (with .NET 8) created on a different machine. None of the above solutions worked.
However, I got it working by adding a new winforms project to my solution. Suddenly VS recognised the original form and was able to open the designer. (I could then delete the new project.)