@OP It's inescapable that fully remote engineers will be less desirable than ones that comply with the CEO's mandate of 4 days working in the office.
Your manager obviously values your work and has already hinted that you're on thin ice due to being fully remote. Working in the office for 4 days a week is a basic requirement mandated by the CEO, and those who cannot meet this basic requirement will always be judged unfairly. Your manager may try to defend you because he values your work, but the managers above won't have this visibility. Upper management will cut and will start with those who are unable to comply with these basics. I call it basics because it's not performance-based; one just needs to go into the office and work.