Otherwise sticking it in is still far better than folding. The only times I would fold AA on the flop to a shove is if it's extremely dangerous, let's say QJT 2 suits or monotone and I have the wrong suits of AA and villain reraise me showing that he's either got 2pair or some OESD or set plus FD. On the flop, make your usual cbet if you were the raiser, and reraise any cbet from villain otherwise. It cuts down their odds and makes it unprofitable for them to call pf 3bet.
If there's been raising before you(a lot of setminers in small stakes say, like to raise from OOP when it's actually -EV to do so vs good players in LP), make sure you reraise big. make sure you put in a good raise(without giving away your hand) of 3-4BB without limpers.