@Nickshas and @adalys can you try the code below:
<script>
window.addEventListener('submit-form-success-form1', (e) => {
const response = e.detail.response || {};
const data = response.data;
if (data && data.redirect) {
window.location.href = data.redirect;
}
});
</script>
This code will be working with new form blocks