In my case, this issue was solved when I updated both machines to the very latest version. It turns out the machine that was having issues was slightly behind the machine that created the project... there must have a been a breaking change made at so...
I have also encountered this problem for the first time today. I work on the same projects on two different machines (via Git). This has never been a problem. I just updated STM32CubeIDE on both machines this week (to 1.6.1 from probably an early 202...