It's not about Poland, but about Ukraine.
Your post implies it's the Polish government's initiative, while it's not.
Ukraine is running low on recruits and its government decided to shitlist everybody and their dog living abroad. The Ukrainian government stopped servicing its male population abroad. If they don't go back to Ukraine to register for conscription, they will not be able to renew their passports. Hence, they will struggle with getting legal jobs in the EU, or getting social handouts as refugees. Their driving licenses will be cancelled and they won't be able to get legal jobs in Ukraine either.
So, the ones who decide to stay in the EU will just have an opportunity to do illegal jobs, that may be paid below the minimum wage, but they won't be able to drive cars. It will reduce their employability, but will also increase the number of Ukrainians driving cars without having driving licences.
Kyiv imposed martial law at the start of Russia’s invasion, banning men aged 18 to 60 from travelling abroad without special dispensation
www.telegraph.co.uk