I’ve dealt with it by never being just a developer.
IT infrastructure, cloud, cyber security, privacy and risk, customer success, QA, SRE.
Add a dash of doing stuff that not everyone else wants to do and that gets me or has kept me with a high paying job in IT.