Earlier quoted context omitted.
I'm interested in what you mean by "setup script" - I assume you have a script of some sort you run when / if you re-install the OS? I'd love to hear more about this!
Look up dotfiles on GitHub - for example https://github.com/mathiasbynens/dotfiles/blob/main/.macos
But it seems this project has fallen behind on PRs.
If you would like to have this fix, you can do this after cloning the repo:
git clone https://github.com/mathiasbynens/dotfiles && cd dotfiles
git fetch origin "+refs/pull/*/head:refs/remotes/origin/pr/*" && git cherry-pick origin/pr/963