But it's not ideal. You make it harder for yourself if you want to focus on muscle mass. It's harder to be in a calorie surplus, the energy you consume gets used to restore what you lost with the cardio and you simply have less time for recovery if you want to keep the same training volume in your weight training.
Some base level of cardio only makes it harder to gain muscle mass if you are really short on time. I don't think it'll hinder the average person to maintain a surplus – first, you don't burn that many calories exercising as you might think, especially once you're adapted to it, and second, our food environment makes it relatively easy to increase calories if needed.
I'd also challenge the idea that cardio interferes with your recovery for weight training purposes.
I thought Attia recommends increasing your VO2max which is a function with weight as the denominator, so losing as much weight as possible while still being strong would be preferred to gaining muscle mass and being heavy.