Thank you for the advice Aditya. I managed to get it working by adding an extra line in my docker entrypoint although it does slow the process down a little when launching the container
My concerns with overriding the preference file path was that I then have to manage the ownership permissions of the file that is created which is tedious as we run various different users in production.
Thank you for pointing me in the right direction though!
We have a docker setup for pgadmin and we want to force autocomplete on keypress at launch (not through the preferences) using an environment variable or config of some sort. I tried modifying the file at https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py#L792 and replacing False with True and this works but then breaks postgres in other ways. Is there a proper way of doing this beyond modifying this file?