@StephanG
The "Enable-RemoteMailbox" will create a connection between Exchange on-premise and Exchange online. After that, it will not create a new mailbox in Exchange online when you assign license. Even if a new mailbox is created, it will connect with this remote mailbox automatically when the next synchronization because the relationship has exist.
So, just make sure "Enable-RemoteMailbox" command was running successfully, the situation you are worried about will not happen.
You can use script like below to check it(Or create a loop, the next step will be executed only if the command runs successfully):
$resoult = Get-RemoteMailbox NewRemoteMailbox -ErrorAction SilentlyContinue
If ($resoult -ne $null){
#This remote mailbox created successfully
#Do the next step
}else{
#Not created successfully
#Bypass or checking in a loop
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.