Is this Virtual Revolution (2016), also known as 2047: Virtual Revolution...?
In a future mega city, where most people spend most time hooked up to a virtual world, an agent, employed by a corporation supplying virtual reality, is busy tracking down killers/terrorists, both in the virtual and real world.
The film is set in a futuristic version of Paris that bears a striking resemblance to the version of Los Angeles depicted in Blade Runner. In this world, 75% of people spend almost all their time logged into virtual reality massively multiplayer online role-playing games known as 'Verses;' these people are known as the 'Connected.'
The protagonist -- a Rick Deckard knock-off called Nash Trenton -- is a 'Hybrid;' someone who spends part of their time in virtual reality and part of it in the real world. When he's in the real world, he works as a shadow agent for a corporation running one of the Verses, but rather than being paid to hunt and kill replicants, his targets are 'Necromancers,' a group of terrorists who've recently been killing Connected individuals with a digital virus.
Around 26 minutes into the film, there's a scene where Trenton logs into a Verse using a Necromancer's equipment and account. He wakes up in the body of a blonde female avatar lying naked in a bed with two other women. He gets out of the bed, looks at his avatar's reflection in a nearby mirror and says "typical," then puts on some clothes -- a mixture of fabric, leather and metal armour -- picks up a firearm and leaves the room.
After that, he meets a male character and they team up together in a fight against other characters, including a mecha-style robot. This specific Verse has urban military sci-fi stylings, so the characters (including Trenton's) use modern/futuristic weaponry, such as firearms and grenades, rather than swords.
When Trenton logs into his own VR account though (which he does repeatedly in the film), he enters a medieval fantasy style Verse in which his character is a male swordsman who travels with a small party of other similarly-themed adventurers. In the opening scene, we see him and his comrades battling a female character who uses both a sword and magic.
There's a brief shot of Trenton waking up as the blonde female avatar at around the 0:29 mark in the trailer below.