The current code from master detaches a servo within a running PWM duty cycle. This can lead to twitches and in worst case destroy the servo. There are already comments and PRs for solving this issue. #7084 and #7023 This issue is opened to follow up with this PRs.