That is indeed how MaxUnpool works but I would have quoted another part of the doc 3 :

Note
MaxPool2d can map several input sizes to the same output sizes. Hence, the inversion process can get ambiguous. To accommodate this, you can provide the needed output size as an additional argument output_size in the forward call. See the Inputs and Example below.

If you want your output to be of size 4x4, you have to specify output_size=(4, 4)