Can you post screenshots of your client script? If your client script is preventing submission, the UI action shouldn't redirecting the page.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!