Same as if you do it in reverse, upvoting from the post page and then going to the main.
The upvote is applied right away though, I tested by having my desktop browser open and upvoting a post. It just doesn't load into the UI till the app is reopened.
So you could just leave the post trusting that the upvote was applied. Would be nice to see it consistently in the UI