So, how do you overcome this?
Once you understand the dynamic, you stay vigilant for the trap. Spend far less than you earn. Invest the balance. Keep your options open. When others panic, you simply pivot.
Recommend you read "Same as Ever" by Morgan Housel.