Full scale war with Ukraine (if not all of NATO) is still a possibility, and it is a bad idea to leave pockets of surrounded but armed enemy troops behind your lines.
If the Russians threatened Western Ukraine, NATO would not be able to keep the Poles from going in.