See, this is what I find shallow about "but we know they are coming back" as criticism.
People are acting like the moment to moment emotions of seeing characters lose don't matter in storytelling. When T'Challa was chucked off the mountain by Killmonger after "is this your King?" and his mother, sister, general, and girlfriend are balling their eyes out because they just lost their king, friend, and loved one, THAT moment mattered, if just for that moment. We all knew he wasn't dead. We knew he was coming back in the third act to kick ass and reclaim his position in his movie.
But did people say "no stakes because he didn't die." No, they recognized it was a sad moment that motivated the characters left behind and forced them to grow and further define their loyalties (like Okoye and Nakia when they argued about saving their country vs serving their country) and framed the return of the title character as emotionally satisfying and heroic.
Same thing when Civil War happened and people complained there weren't any stakes because no one died. But the stakes was the split of the Avengers, and that DIRECTLY sets the stage for Infinity War invasion.
Had the Avengers still been a team, they would have been in much better position to handle what happened, but instead they were scattered all around the globe, not in communication, off the grid, and vulnerable to a world ending attack. There were stakes to the accords and Zemo splitting them apart.
That is common fiction writing 101 stuff. Because T'Challa came back, it doesn't render his defeat pointless or lacking in stakes. Because no one died in Civil War, it doesn't render their dissolution pointless or lacking in stakes.
The same holds true here in Infinity War. Now I can't say for sure how they will handle it, but the Russos have stressed that they are committing to what happened in IW.
The Russo Brothers Talk About Alternate Realities In ‘Infinity War’ & ‘Avengers 4’
Time will tell if they follow through, but I feel like I have to point out that Black Panther and Spiderman and others returning wouldn't render their deaths pointless because there could very well (and most probably will) be a cost to bringing them back.
The characters left behind are going to struggle with who died, get motivated to Avenge them, and arrive at a different place than they were before the snap. Those are stakes. And when Tony Stark, Cap, and whoever else of the remaining characters sacrifice their lives in a quest to reverse what Thanos did to the universe, the stakes will be upheld. Sure, the characters we know are coming back will come back, but it won't be without the cost of saving goodbye permanently to other beloved characters.
I'm pretty positive Thanks created a death domino effect in Infinity War. Even if some characters come back, their revivals will be in a chain of other characters dying.