The key thing is to look at how the job posting is worded. If it says "office work in Moscow required" or "mandatory in-office presence," then hiding it is pointless and counterproductive. But if nothing specific is mentioned about location or there's a mention of remote work being possible, you can just write in your resume "remote, based in St. Petersburg" and not make a big deal out of it. Honesty works in your favor here, because the company gets a clear picture upfront - either they're fine with it or they're not.
But if you stay quiet and go through several interviews, then come clean, you create the impression that you were hiding information. Even if your reasons made sense, it can breed distrust - like, if you already hid one thing, what else are you hiding? It's easier to be honest once and filter out companies that won't work with your setup than to explain yourself later.
Pro tip: add a line to your resume like "willing to travel for work" or "open to in-office onboarding" - it shows flexibility and can put an employer at ease if they're a bit concerned about the distance. Then even if you're in St. Petersburg, it comes across not as a problem but as something with a solution.