It’s not illegal for a company to marginalize someone for rocking the boat. I’ve worked with tons of people who have been relegated to basement offices or positions where they just “advise” but do nothing all day. Someone thought they had something left of value to add. Then they get a new boss or their current boss has enough and kicks them out.