There are several advantages the 5700X3D has over the 5700G.
Much higher amount of L3 cache. (96MB vs 16MB)
Supports newer PCIe generation. (PCIe 4.0 vs PCIe 3.0)
Supports more PCIe lanes. (20 vs 16 - including 16x for graphics vs only 8x)
There are a few advantages the 5700G has over the 5700X3D.
Higher clock frequency. (up to 4.6GHz vs up to 4.1GHz)
Will run much higher memory speed 1:1 with fabric.
Has an integrated IGP.
If the primary use of your system is gaming and you are looking to maximize FPS, and do not intend to ever use the IGP then yes, the 5700X3D offers the better experience.
Ryzen R7 5700X | B550 Gaming X | 2x16GB G.Skill 3600 | Radeon RX 7900XT
Ryzen R7 5700G | B550 Gaming X | 2x8GB G.Skill 4000 | Radeon Vega 8 IGP
Ryzen R5 5600 | B550 Gaming Edge | 4x8GB G.Skill 3600 | Radeon RX 6800XT