I just ran in a changed behaviour with the defaults command.
I have a script that adds a folder to the list of background pictures. It worked fine until macOS 13.2 I think. Never checked after that. Just saw the new behaviour while looking for ways to have a different lockscreen picture than the desktop picture. (Spoiler: It's not possible.)
Normally the script simply runs this command in the user context:
defaults write com.apple.systempreferences DSKDesktopPrefPane -dict "UserFolderPaths" "( 'path_to_my_wallpapers' )"
This updated the plist file below and the user saw the folder with additional company wallpapers.
~/Library/Preferences/com.apple.systempreferences.plist
Now the command writes to the sandbox container. And whats more worse, the user does not see the folder in System Preferences
~/Library/Containers/com.apple.systempreferences/Data/Library/Preferences/com.apple.systempreferences.plist
So, currently I don't see a way to write my setting using the preference domains with the defaults command. I'll have to write directly into the file and crossing fingers 'cfprefsd' will not revert the command.
Anyone else experiencing this?