At block boundaries, if canonical blocks catch up to the pending state, it clears the pending blocks and sets it to None
If a user requests eth_getBlockByNumber at this point with the pending block tag, they will receive a null which forces them to retry again
Geth's behaviour appears to be to just return the latest block when fetching pending - as L2s dont really have a pending block in non-flashblocks mode anyway due to not having a public mempool. We should match that behavior by falling through to fetching Latest when Pending is None