Everyone vents. It’s in our nature, but venting should be done privately. What you spew on others can be washed off but it never gets flushed.
Even if you can’t move to another place, you can always remain occupied.
If you don’t have the authority to pass a judgement or pardon guilt then stick with being a friend. That is one thing we all need at one time or another and it is something we are all qualified to give.
Separate issues but when one is met by the other it multiplies the effect.