I decided to do a little looking into this, here's what I found so far skimming a few articles and wikipedia.But it was exactly like that in the case of important mine in Turów I described. UE court demanded immediate shutdown. Sorry, but You are just ignoring the facts.
Then mine was actually set to shut down in 2020, but the Polish government allowed the mining company to extend the deal to 2044, which is already a failing if you're aiming to slowly phase out coal.
Then the mining company set about expanding the mine causing the Czech goverment to sue over environmental damage and damage to wells in villages across the Czech border, a case the Czech won. The court issued an injuction demanding that the mine be shut down and the Polish goverment kept the mine running, citing that it would harm jobs and energy security.
However, according to this research ( https://zklaster.pl/wp-content/uploads/2021/05/presentation_13.10_en.pdf ) there would actually be more jobs and savings on electricity over 25 years, roughly the point the mine was set to shut down anyway.
Seems a shit decision on the part of the Polish government if you ask me.