Hilchos Lashon Hara, chapter 1, section 6
Even if keeping away from saying bad things about Jews (and from other forbidden speech) will cause a person a big loss in their income, they are still not allowed to speak lashon hara.
For example: a person works for people who have no fear of Heaven, and they fire anyone who does not speak lashon hara like them. Because of this, the person will have no income for the family. Even so, it is forbidden.
It is like every other negative commandment in the Torah: a person must be ready to give up everything they own rather than break it.