Your eyes are spheres: when you look up, they are still "rolling;" they're rolling back, subtly; the result is you're looking upward.
when I feel exasperation and roll my eyes: eyes briefly close, reopen as I glance up and away (or diagonally, or even just to the side), usually theres some kind of exhale or "tsk" sound, or a deep breath while I formulate a response, then looking back at the speaker.
I seem to remember performing this action as a kid before I knew what it was called ("don't roll your eyes at me!" "I didn't!" <- yes I did, i just wasn't aware that's what it was called yet)
The difference between this and just "looking away and thinking" is where tension is held. Rolling my eyes, my eyes are fully open while tension in my brow is sometimes directed inward and down. "Thinking" sometimes involves the lower eyelids (squinting), pursed or pinched mouth, and y'know, making a thinky sound.
Ofc you can roll your eyes as you think too, so the two expressions are pretty similar and it's not uncommon to be misinterpreted if you're not very expressive in the first place or you're being subtle (Context and sounds you make go a long way). Because rolling your eyes does usually come with thinking about something.