"Vertex Data Detected" - Dynamic Topology (Dynotopo Warning)
The default cube comes with a UV map (so if you want to apply a texture you're already halfway there) which is what's upsetting Dyntopo. Click on the "Object Data Properties" tab (the green triangle, third from the bottom on the right), then unfold "UV Maps" and click the minus symbol on the right. Dyntopo will no longer complain when it starts, or switch off when you change editing modes.