Ondetachedfromwindow is called when it is already detached and someone is being ignored

Finally you get to know what your problem is.

Well ... It depends how you look at it.
My problem is "Every time getArticle () is called, all of the code is executed." This is something that I don't think should happen under any circumstances - no matter why you are doing it, and whether it makes sense or not.
So I'm happy about all of the workarounds mentioned, but I see this one central problem as a bug in itself. Or at least as a major problem. So it should at least be documented somewhere with a huge "WARNING!" before.

Your suggestion with the EP when creating / editing slices only works if all modules statically always deliver the same content. But as soon as a module shows a completely different list of results depending on the search query in the frontend, I cannot evaluate the later dynamic output of the module when saving a slice in the backend. There is therefore a problem with dynamic modules (search results, article lists, scrolling functions, ...).

So I see the problem completely detached from any specific use cases - be it SEO or any other reason why you should need the article content several times in different places.
And the problem with multiple computation is there. Unless, of course, someone can conclusively explain to me why it should actually sometimes be necessary to process the code individually for each call.

Normally, the article issue is used exactly once per page view.

Just the fact that there are a few threads in the forum about e-mails or the like that have been sent several times should refute your statement, right?