Question: As far as I understand it, an illegal contract is void, and the Polish Supreme Court has assessed that EU contract violates the Polish Constitution.

Why is Poland still considered an EU member state?

Answer: 
Opinions [vary a bit](https://politics.stackexchange.com/questions/69329/how-does-the-polish-courts-rejection-of-eu-law-supremacy-differ-from-germanys) on interpreting the Polish court decision.

According to a more strict reading of the Polish court's [announcement](https://trybunal.gov.pl/en/hearings/judgments/art/11662-ocena-zgodnosci-z-konstytucja-rp-wybranych-przepisow-traktatu-o-unii-europejskiej), they haven't declared any parts of the treaties illegal *per se*. They've only declared some CJEU decisions illegal in Poland. Under the treaties, Poland signed up to the acquis, but those decisions were taken after Poland became a member, so they don't fall under the acquis... and arguably the decisions [were a little bit innovative](https://verfassungsblog.de/commission-v-poland-a-stepping-stone-towards-a-strong-union-of-values/) in their interpretation of treaty provisions. (Although the Polish court rejected wholesale the CJEU interpretation of Article 19(1)--it's at most [two decisions](https://journals.sagepub.com/doi/full/10.1177/1023263X19892185) that are involved both taken after 2018.)

Several EU countries (including Germany in *Weiss/PSPP* and Denmark in [*Ajos*](https://verfassungsblog.de/legal-disintegration-the-ruling-of-the-danish-supreme-court-in-ajos/)) reject unbridled supremacy of EU law, to various extent[s]. If you read through the much more numerous articles that have been written about PSPP, you can find
extremely conciliatory ones that speak of judicial dialogue, but [others](https://verfassungsblog.de/germanys-failing-court/) that conclude that the principles put down on paper by the German court "directly contradict the very idea of the European Union". And
a third [kind](https://www.mpifg.de/pu/mpifg_dp/2021/dp21-1.pdf) that applauds PSPP for stemming the never-ending bias that CJEU [supposedly] has towards granting EU institutions more powers.
As far as the **EU** is concerned, Poland will remain a member until it triggers [Article 50](https://en.wikipedia.org/wiki/Withdrawal_from_the_European_Union#Procedure) and the time limits run out (or a different date is mutually agreed). Article 50 leaves it up to each state to set the constitutional requirements for the Article 50 notification.

Hypothetically, the Polish supreme court could judge itself qualified under the Polish constitution to write and deliver the Article 50 notification, but it has not done so. If that were to happen, the EU would have to decide if they take such a letter by a court rather than a government at face value. The supreme court could also order the government to write the Article 50 notification. If the Polish government were to comply, it would be closer to the expected process.

But politically speaking, neither is a realistic option. The Polish government and their court do not want to leave the EU, they want a maximum of EU subsidies with a minimum of EU interference in their traditional values, and they want to win certain voter groups with their rhetoric.