OldProvider can take the 30 days notice, but they dont need to submit the disconnection order until close to the termination date.
That means there are no in-flight orders to block the connection request from NewProvider.
Or the customer can be proactive and get NewProvider set up on port2 and tested working before giving notice to oldprovider and just accepting there will be a 30 day overlap.
This is especially important with number porting where if there is an issue with the porting request, oldprovider may cancel the line before the porting is successful and then you go down the rabbit hole of trying to reclaim the number.