How far should ground pour be from a 50 Ω trace?

At least 3 times the height of the dielectric between the trace and its reference plane. There the pour changes the impedance by under 1%. At 1 times the height it pulls a 50 Ω microstrip down 5 to 9%. The trace width does not set the distance, and the 3W rule is about crosstalk, not impedance.

It matters most on 2-layer boards, where the plane is 1.5 mm away. A 50 Ω trace there is 2.8 mm wide, and ground pour at a 0.3 mm clearance makes it 37 Ω. At 0.5 mm it is 41 Ω.

The other way is to make the pour part of the line: a coplanar waveguide. On the same 2-layer board a 1.01 mm trace with a 0.2 mm gap to the pour is 50 Ω, if the pour is stitched to the bottom ground with vias along both edges.