Update scene when lights are changed - motion lighting?

You could do some of this easily with motion lighting: add them as additional lights to turn off ("Additional switches to turn off when turned off"), and then they won't stay on after your automation turns off the "normal" lights. They won't turn on when you come back in the room if everything turned off, however. You could create an entirely separate Motion Lighting instance just for these apps and use some way to restrict the "on" and/or "off" actions to your liking--for example, a virtual switch or (real or virtual) button device. There are lots of options in ML, and you might be able to figure out something using devices that you have.

Alternatively, you could capture a scene when you leave and re-active that scene when you enter. In Groups and Scenes, there's an option to create a "scene capture" device, which gets exposed as a (virtual) button you can push from any app. I haven't actually tried this with ML, but if the "Buttons to push when turned off" option there works before your lights actually get turned off, you could probably use that to capture the scene. But then ML doesn't have an option to turn on a scene instead of turning on lights (though you could try turning on the scene device itself), so I'm not sure how well that would really work. This might be one case where a rule is easier.

I should also note that I wrote the custom app below for a similar situation. I have lots of two-bulb fixtures in my rooms but usually only want one bulb on. However, I want both to turn off, and if I had both on, leave, and come back, I want both to turn back on--effectively "remembering" the previous states. The app has grown to accommodate other user requests over the years (and I'm not sure how many people even know that I originally wrote it for that purpose), but maybe you'd be interested in checking it out, too: