UserDefaults are getting erased for me on the Simulator (15.0) every time. Some users (iOS/iPad OS 15.0.2) are reporting to me that my app is erasing all their settings after re-launch.
In the Simulator, I can reproduce this by quitting the app and relaunching it manually. The same procedure does not cause loss of date on my iPhone or iPad running 15.0.2, but does for a handful of my users.
All of the many posts related to this issue seem to be at least 5 years old, but I am having the problem now.