pre covid we were late leaving port (midnight )
People checked in then went ashore not sure what time all aboard was
I think for US ports the cut off is 90 minutes to be checked in so the manifest can be submitted to the authorities
You could try asking Oceania
Only a couple of ports I have heard of where you cannot return ashore were Vancouver & Australia