I’ve had this happen with the retain: true option enabled. In addition, it may seem weird but every time I add more devices, I make a quick copy of the config, uninstall the Mosquito broker within hass (or whatever your environment) and then re-install with the previous config. Until I did the reinstall, I kept getting “ghost” commands aka lights turning on/off without my intervention. Note that you may need to restart the SmartThingsBridge for everything to go back to normal as well.
I have had to do this anytime I added new devices to the mix.