I’d like to know this with a bit more depth.
Will the mac go to sleep if you let it running a long youtube video?
Will the mac go to sleep if it has a cloud app enabled (google drive/dropbox/iCloud drive…)
I’ve been testing this but I got inconclusive results. I know it's a bit of a broad question, but this has got me a bit puzzled.
Test I did as example on my mini 2014 on Mojave.: I seems that when the display shows a moving image, even if on a background app (such as a youtube video mostly stopped by Finder but still showing movement) prevents sleep, a similar video with a static image but playing audio slept the display (and locked the mac) but didn’t sleep the mac. If the video is playing on another hidden tab, the mac screen or the mac itself (not sure what happened) went to sleep once, not another. No app, nor safari, showed in activity monitor as preventing sleep.