In the campaign event step,
send BEFORE will listen to the event start time (appointment start time).
send AFTER listen to the opt-in time and custom time.
send IMMEDIATELY will send immediately no matter what the Custom Time and Window in the Campaign Configuration are. This is the main reason why calls, emails, and SMS got sent outside the Custom Time Window.