From bitcoin wiki:
A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours.
If a miner submits a block timestamp on the cusp of the network-adjusted time + 2 hours threshold, some nodes will see the block as valid and some will see the block as invalid, regardless of the work done on the block. How do nodes come to consensus on whether the block is valid?