Ah I know what you mean! Not necessarily the sadness that it ended, or that characters are taken away, though that comes up, too.... But a kind of happy sad because of something that has real impact.
Maybe it's because I find a lot of sad-ish movies are the best...
I think this kind of melancholy feel for me lasts for a rather long time after watching a movie, depending on how great I think it was, and how well the impact from it sits with you and perhaps grows stronger with time. I get kind of obsessive and sad (yet happy?) about a movie, too... Looking it up, maybe memorizing some lines, downloading the soundtrack, re watching, asking others if they have watched it... Etc.
I can remember this happening with Space Odyssey 2001 (hence username), One Flew Over the Cuckoo's Nest, Les Miserables (even tackled the book, too), most Wes Anderson films, The Perks of Being a Wallflower, The Shining...
Maybe we get sad about our real lives after this? That it isn't as amazing as the movie? I don't know, but for me, it's a happy kind of sad. Very enneagram 4-ish. I get very reflective and creative (and obsessive about a particular movie or scene) in a melancholy, somber kind of way.
Ah, I think I'm just as baffled and riddled with this emotional response, too.