@AdFundum did you find a command that works from the terminal/adb shell? If so, does that command work if you make your app unconfined?
Its possible that UT does not have an app armor policy that fits your use case, and that's the cause of your problem. From the list of policy groups I cannot see anything that would allow a confined app to change the background image.
https://docs.ubports.com/no/latest/appdev/platform/apparmor.html