Did you install the PAS sensor on the crank? $27 on Amazon:
Might as well buy one from Bolton ebikes here
https://boltonebikes.com/products/bbshd-gear-shift-sensor
Or Amazon offerings
https://www.amazon.com/BAFANG-Sensor-Shift-Cable-Gearsensor/dp/B07LFBPQZM
https://www.amazon.com/BAFANG-Motor-Sensor-Drive-System/dp/B07BGVLW1J?th=1
Might be worth a read https://electricbike-blog.com/2016/03/21/is-the-gearsensor-a-total-waste-of-money-or-a-must-have/