IF selects one path using a Boolean condition. In a manual-or-automatic controller, only the selected mode may request motion. Put the process permissive in both branches or apply it after computing the request. Assign the output on both paths so changing modes cannot leave an earlier command retained by accident.
Test mode selection with opposing commands: automatic false and manual true, then automatic true and manual false. An OR of both commands fails these tests even if it seems convenient. Finally remove the permissive while the selected command stays true. A selected request still needs its common operating condition.
Read the tag list and the requested sequence before editing.