As soon as VSCode updated to version 1.79.0 (on 2023-06-10 for me), it stopped suggesting variable names from other files. Everything was working fine up to yesterday.
I recreated the simplest example I could:

What went wrong? Is there a new setting I need to change? Or is there a way to downgrade?