I found tedious to close the message fancybox everytime, once it displays “Your message has been sent”, you have to click the close “x” in the top right corner, over and over.
//below line 1039 :
window.setTimeout(function(){jQuery(".fancybox-close-small").trigger('click')}, 1500 );
Then all you need to do in minify the JS, as it is the one being used (I used https://minify-js.com/ for that), and replace the original common.min.js* file with my file.
*Do a backup, just in case.
Of course, I am aware that at the next update this code might be overwritten.
If you have a better solution, let me know.
No need to replace the core JS, you can try using a custom JS (loaded via a child theme or Code Snippets plugin) and add an event for the form submissions with a delay, then you can use this code to close any open modals: