As I wrote elsewhere, there are no guarantees in life. Maybe you're at a large stable company that pays well enough and that has a pre-COVID history of being remote friendly. In that case, you're probably in reasonable shape at least until you want to change jobs for some reason. But anything that's team dependent could change in a heartbeat. You may be able to drag your feet for a while but eventually you may have to choose between going back into an office at least part-time or finding something else.
Resume/LinkedIn, savings and mindset are important here. If you want the freedom to say "That's gonna be a 'no' for me, dawg." when your company decides they want everyone to RTO, you need to be mentally prepared for it as well has having a good profile/resume and enough money to tide you over. That takes planning.
Amazon has already made it clear it will leave the decision to individual teams, and it has been the case so far.