Mozilla fixed the issue https://bugzilla.mozilla.org/show_bug.cgi?id=1785278 with Firefox snap for Linux, by adding an new path to add config files.
Starting with Firefox 108 (currently fairly far away from release) files in /etc/firefox/config.js
and /etc/firefox/defaults/pref/config-prefs.js
should work
I can’t update to a nightly, so will have to await the release