I doubt this is fixable with reasonable effort. We’re already doing the “impossible”, something not really popular, that is using mediawiki with the same database on two different domains, a clearnet and onion domain, which was a lot effort to figure out since it’s not really documented.
That may be doable when using a wiki with onion only.
The only thing I find is $wgCanonicalServer
which is set to $wgCanonicalServer = 'https://www.whonix.org';
on the onion.
But changing that to onion would break other things.