As part of the feedback we received in T311717, the global variable wgSpecialPreferencesUseMobileLayout should be transferred to a package file. See https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/25565da47b1fb057ec0e8adefad1dc96dbf19ad8/extension-client.json#370 for an example of how that works.
Background
Moving these files to ResourceLoader keeps them local (mw.config values are globally available and this doesn't seem like one that needs to be as it is internal to the preferences page)
More information on recommended best practice here:
https://www.mediawiki.org/wiki/ResourceLoader/Package_files#Config_files