RAK831 with RPI 3B+ suddenly not working anymore

You seem to be mixing up two different repos

Is fairly ordinary, pretty much just using the code straight from Semtech

But

Seems to have RAK customization to account for the SPI speed limitation resulting from the unfortunate and mistaken inclusion of a slow SPI level shifter in the RAK2245, and internal API changes to add some sort of SPI mux (maybe to use two concentrator cards?).

If you have a RAK831 you should probably start from the previous repository.

If you have RAK2245, either use the previous one and edit it to reduce the SPI speed, or use the newer repository.

In either case you should probably start clean, without any leftover lora or gateway related files from a previous install, as it looks like some of the customizations break compatibility.