Regardless of possibility, I I think such an effort would be futile.
Do you want to be a physicist?
If yes, then you don't need to do a CS Masters. You will learn what ever CS knowledge you need during the course of your PhD. A PhD necessarily involves a lot of self study, and some of that could be learning CS material.
If no, then the PhD in physics is pointless. A PhD trains you to be a researcher in that field. It's not just classes and book-knowledge but is where you do your own research. So if you don't want to be a physicist, your financial and mental health will be better off if you get straight into whatever you do want to do.
Most of the reasons for doing a Masters, like boosting your admission prospects or preparing to start a PhD, don't apply if you do them simultaneously.
I understand the FOMO of knowledge and the feeling of wanting to be an expert in everything. But at some point you need to qddeot that you can't specialize in everything, and trust your ability to self study (or at least informally study) the new things you want or need to learn.