The cloak of legality may serve as an excuse once occupation was completed
No-one said it was legal. However, it could easily be argued that under what can be considered to be international law at the time - the Congress of Vienna more or less legalised things. So - perhaps we could say that Poland was occupied from the time of the First Partition all the way through to 1815, after which, the territory was annexed.
But let's look at the dictionary, shall we?
The action, state, or period of occupying or being occupied by military force
- the Roman occupation of Britain
- the Nazi occupation
the act of annexing, or territories that have been annexed; the legal merging of a territory into another body
It's clear that Poland was annexed into Prussia - not occupied. It wasn't as if there was some military occupation and the people living under military rule - they were living under clear Prussian civilian rule. And for that reason, the country was annexed and not occupied.
You wouldn't say that today, Lubuskie is "occupied" by Poland - it was annexed by Poland, plain and simple.