Tax residence is assessed from your centre of personal/economic interests or more than 183 days in Poland; it is not proved by a PESEL, citizenship or residence permit.
If another country may also treat you as resident, use the treaty route instead of making a final tie-breaker conclusion.