Physics vs Math in the future of "AI"

Hello people, I am currently a math major but Im considering switching to physics but I dont know if it is a correct decision for sure. I want to do a masters and PhD after I graduate. And my goal is academia, so I am trying to higher my chance to stay in academia (like choosing more applied fields with more funding and positions) My struggle here is if math academia will be affected by AI and decrease the number of positions and change the nature of math. Since physics is empirical and requires experiments, it seems like a safer choice and I like math and physics equally. If everything goes well, I will graduate from undergrad in 2 years + 2 years masters + 4 years PhD + postdocs. So considering AI will be more powerful when I get my PhD, I want to consider this switching before its late, when Im still in undergrad. I need your opinions, thank you so much

Author: InevitableMain9034