I think a framing device could work very well: have a short pre-title sequence. Everyone sits down at the table then the GM says, "Are we all ready to play the Search for the Maguffin? Right, you are all relaxing in the Boar's Head tavern just as ... roll initiative!
That wouldn't work at all for the normal audience and even propably not for most D&D fans. Why? Because it seperates you from the story. Suddleny the movie is not about a group of heroes fighting to save the world, now it is a movie about 5 people, sitting on a table playing make believe. It kills all the tension for the audience because now the stakes in the movie are not "will the world be saved" but only "will these 5 people have a nice time at the table".
You can't make a multimillion-dollar movie about "will these 5 people have a nice time at the table" unless you put in other real-world stakes in it.
From a writers-perspective if you put such a framing-device in, it would mean that you have a two level story. The first level is "the real world", the second level is the "game world". If you introduce "the real world" (movie reality), it means that
the real world would need to be important for the story. If it isn't it is not only senseless, it would also cheapen everything that happens in the
game world. If you want to do it that way, the
game world needs to really impact the
real world in the story.
Jumanji does that: In the original Jumanji, the game litarelly effects the real world and the players have to finish it to leave it. In the Reboot/Sequels they are trapped inside and need to finish it to leave it. The stakes in the game translate to the real world setting of the story and so they matter.
Also
Ready Player One does that. The
Game has big effects on
the real world, thats why its matters.
Another (also quite bad example, because it is really badly written) would be
Mazes and Monsters - the game is having a psychological effect on the players, so affecting the "real world" in the story - so when things happen in the game, they matter to the players.
Even in
princess bride - the fantasy story is there to create change in the real world. Princess Bride is a story about a grandfather who uses a fantasy story to win his grandson over to him (at the beginning the boy doesn't like it that his grandfather his here, in the end the boy wants him to come the next day again and read the story again).
Even
Stranger Things does that a tiny little bit (they use their D&D Knowledge in the first season to solve some of the mystery - but they also don't focus on the D&D Game, because that would really distract from the real story.
Another possiblity would be the
Narnia-Route, which is similiar to Jumanji.
So if you really want to use such a framing-device in a D&D Movie you would need to put in real-world-stakes. There needs to be a reason why we should care about the players and not the characters, because the D&D Characters don't matter for the audience, if they don't care about the players, if you introduce the real world.
So if you put in such a framing device, you make it for yourself way harder to make the audience care about the fantasy story and you have to work very hard, to make them care.
So, what could this real-world-stakes be?
Idea 1: In a D&D Kids Movie this could be an outsider, a kid who doesn't have any friends and through the power of D&D makes new friends (like the episode of
Community where they play D&D)
2: Go full-on Jumanji or Narnia - teleport the Players into the D&D World. But if you do that, you need to do it better then Jumanji. The Film
Monster Hunter tried it that way (teleporting real world soldiers into the game world) and the movie is worse for it.
3: Have them work trough some real world crises and having them play D&D as a means to escape from the naughty word real world (like a pandemic ...).
4. Do a Maze and Monsters remake, but make it into a positive thing where D&D helps with the psychological problems of the players.
But if you do put in real world stakes,if you have an outer frame story, this stakes and this story need to emotionally grab the audience more than the stakes in the inner frame story (the fantasy story). If the fantasy story is more interesting and better then the outer frame story, the outer frame story weakens the inner frame story and it would be better to cut the outer frame story.
It is the same reason the "It was all just a dream"-Endings are not used in any good movie or book - because it has the same effect: If the whole story was just a dream, then the story didn't matter to the character in that story - and if it doesn't matter to the character, it doesn't matter for the audience.
And creating stakes in the outer frame that would be better then the stakes in the inner frame is really hard.
It works in the princess bride, because it is a kids movies, made for kids and the writing is really good and it is really light hearted and more of a comedy then a fantasy story.
It works in Jumanji because the inner frame story really interacts with the outer frame and put the stakes of the inner frame world into the outer frame world. The same with Ready Player One (the book, the movie is bad) - the stakes of the game world are the stakes of the real world.
So unless they pull a Jumanji I can't see a way that they can write a good enough frame story that wouldn't sabotage the fantasy story. Not unless they get a really really good screenwriter.