Hi j-andrea,
We understand the applications on your Mac close when you put it in sleep mode. We're happy to help.
It sounds like you may have an auto log out set up. Go to System Preferences > Security & Privacy, then click on the lock icon at the bottom to make changes. Once it is unlocked click the Advanced button at the bottom right. In there is the "Log out after xx minutes of inactivity" option currently turned on?
If that option is turned on, uncheck the box to turn it off then click the lock button in the Security & Privacy window to save the changes. After that test out sleep mode and see if it is still closing your applications.
You can see more about that option here:
Set your Mac to log out when not in use
We hope this helps. Cheers!