That's Stay Alive (2006).
The premise is exactly as you described: a group of friends start playing an unreleased horror game, and one by one they're killed in the same manner their characters died on screen. The film leans into the idea of a game that hunts its players, with a haunted-house backstory tied to the title itself.
It's on IMDb if you want the details. Critical reception was rough, but it has a following as a solid piece of mid-2000s horror.