During our beta Mithril itself has matured from 0.2 beta, to 1.x stable and later 2.x stable. They had their own set of changes, which had limited impact for Mithril components but there was a lot more impact when trying to hack around it, with rendering timing, internal vdom structure, etc. So I wouldn't be surprised that code that used to work before simply doesn't work anymore, even if we didn't explicitly change it in Flarum.
Mithril is pretty flexible when it comes to direct DOM manipulation with vanilla javascript (you can do a lot before it breaks the SPA), the only constraint is that you need to run it from a Mithril lifecycle event if you want to be sure the content exists at the time your code runs. At the very least you should extend the Page oncreate
hook and work from there. Ideally you would extend the hook of the specific component you want to interact with.
Using hooks has the added benefit of being able to access the models and state specific to the component being extended.
The only code that could be put directly in the global javascript context is code that runs on demand and not at page load. For example code that handles keyboard shortcuts, a global share button, etc. That code can run on demand from the global, and interact with the SPA which will likely be ready at that time, and can silently fail if it isn't.