Since you've already run through Microsoft's standard steps (detach/reattach, cleaning pins, restart, driver reinstall, Windows Update), here's what's left to try before assuming it's a hardware fault:
Shut down fully, then press Volume Up + Power to boot into UEFI. Try typing on the physical keyboard there. If it works in UEFI but not in Windows, the issue is software/driver-side, not the connector hardware.
Run the Surface Diagnostic Toolkit (SDT)-runs a dedicated hardware test on the keyboard connector and can catch firmware-level faults that Device Manager won't show.