https://constituicao.stf.jus.br/dispositivo/cf-88-parte-1-ti...
Rather the supreme court declared in 1803 that they had that right, because it makes sense if you sort of squint at the constitution.
Because of authoritarian traumas post-WWII, most democracies evolved to a highly controlled executive, mostly by the judiciary – which is supposed to be monitored by the legislative.
But if you pack the court (the left is dominates Brazil in the last 40 years) and pay enough to the House (the executive controls the federal budget), you pretty much won the game (you are able to make your own rules).
It's amazing how someone from outside like Elon Musk is way, way more powerful than all elected representatives in Brazil, simply because he is somewhat independent from the political apparatus (the most voted congressman in the last election had been arbitrarily banned from social media, so votes really don't count).
The only way out is a combination of international pressure + local manifestations.
On practice, well, they are clearly above the other powers, and only the supreme court plenarium can do anything about the individual judges.