Apple made a major change in this series! Unlike the 2015 models which had the fans plug directly to the logic board, here Apple routed the fans via the upper case via the keyboard logic to then share the connection via the keyboard cable to the logic board!
As you switched out the keyboard cable I can only surmise the connector got damaged in the process or you had liquid damage given what you also replaced, but didn’t find the liquid damage on the uppercase or logic board.