Ensure focus moves to new modal when possible