I can’t say, because I only have my own experience, which is not typical. It makes sense to me that remote employees would be the easiest to fire. Especially when most of the team or department is not remote. There are all-remote teams, and it seems like that would be great, for various reasons that are off-topic here.
I work remotely now, and did at my last job (which I quit – I wasn’t fired), and in both cases I came in with experience and skills that were valued, and most of the rest of the team didn’t have my particular skills and/or amount of experience.
The most important thing is to perform in the role. You have an advantage in that you have fewer distractions from noisy or chatty co-workers, and you get to skip pretty much all of the meetings. So use that to your advantage to get things done.
You really should go above and beyond – mentor others, or even just help with other people’s tickets whenever possible, so that when your name comes up people see you as valuable. It’s easy to be invisible when you’re remote, and undervalued regardless of your contributions. So just be as visible as you can.
One thing to your advantage is that hiring programmers is really hard. Finding the right skills and personality locally is rare. The good people are employed elsewhere or living elsewhere. If you have skills that are in demand, I think you have a slightly better chance to find a remote job than you did 10 years ago. Especially if you know Go. I was contacted initially by my current company just because I had recently pushed a Go project to my GitHub account.