How to prevent scroll-to-top on parent page after form submission?

When a record-editing form (modal or not) is called from a grid and the record submit rule is set to return to the parent page, the parent page always scrolls back up to the top, which is super annoying when you had scrolled far down a long grid to locate the record you wanted to change. Any ideas on how to prevent this?

I have tried a few things such as the following, but that would require setting the scrollPostion before the rendering of my form and I don’t know how to approach that.

// Before submission
sessionStorage.setItem('scrollPosition', window.pageYOffset);

// After page reload
var scrollPosition = sessionStorage.getItem('scrollPosition');
if (scrollPosition) {
  window.scrollTo(0, scrollPosition);
  sessionStorage.removeItem('scrollPosition');
}

Thanks in advance.

Easily achievable using the KTL created by @NormandDefayette_CortexRD. I use _cmr on most of my modals (close modal refresh)

Setting up the Configurator