I have exactly the same problem. The wifi only works when I keep the tablet super close to the router. If I take a step back no network again. I have a similar problem with Bluetooth, any device need to be super close to the tablet for it to connect.
I’ve tried literally anything I could think off to repair with no success.
I don’t get a signal even in the same room next to router. I have a feeling it’s hardware related. I’m currently using a USB WiFi adapter which works fine, but I’d prefer to use the internal.