The whole point of international law is that countries choose to commit to following the same laws. There's no point signing any treaty if you're not planning on actually applying its legislation.
If people they don't like the laws they've committed themselves to, they can choose not to follow them anymore. However, the advantages they receive in return, in this case the freedoms and economic benefits of being in the EU, will also disappear if they decide to play by their own rules. With the massive benefits Poland has gotten from the EU, I don't think it's in their interest to leave, especially since it doesn't have the negotiating power the UK had (and Brexit has been a series of catastrophes nonetheless).
Nobody is forcing these people to follow foreign laws, it's just that they want the benefits without doing anything in return. The EU is not just a trade bloc, it's an institution to create a shared European ideal. They may not like the deal, but they're free to refuse it and negotiate a better one.