Works with a plain adapter
Pentax 645 sits 54.87mm further from the sensor than Nikon Z. You need a 54.87mm adapter, but it can be a plain one — a hollow metal spacer with no glass in it. The lens still reaches infinity focus and nothing is added to the optical path.
Coverage & framing. The lens covers more than the sensor needs, so the body crops into the frame — roughly 1.3×. A 50mm frames like a 63mm would on Medium format.