I have a 2004 Mazda Tribute, 6 Cyl, Sister Car to Meagan's and had the same exact issue.
Only overheats if you step on the gas. Stop at a light, back to normal. A/C has no effect. Turning the heat on has no effect.
After many friends threw all their knowledge at this issue which resembles everything everyone says on this site and the web about overheating, here is what the issue was for me:
The anti-freeze overflow reservoir has 3 chambers at the bottom. In order for the reservoir to be at the full mark, it needs to be at the third chamber furthest from the radiator. The chamber with the arrows is the full mark. If you only see anti-freeze is in the first chamber, you need to add anti-freeze. This type of reservoir fools you into thinking that you have plenty of anti-freeze because when you turn the engine off, it spits some into the first chamber. But in reality, you don't have enough and that's all it was. I added anti-freeze up to the full mark and then checked it with each stop I made (allowing it to cool over an hour and then very very slowly releasing the pressure so the cap wouldn't explode in my face.) This cap seems to hold pressure for a very long time and if you open it slowly, it will start to hiss the pressure out safely (very slowly please.) With a closed radiator system like this, you really don't know how much anti-freeze to add until it sucks it in from the overflow each time and then returns the same amount when your engine is cold.
I hope this helps someone.