I had this problem on one of the machines I worked on. I damaged the gear position switch inside the cover.(Honda P/N 35759-HL5-A01). I swear I put everything together the right way but the amount of empty beer cans proved me wrong.
I would check all of the wiring first. Hopefully you just have a loose connection. Then I would check the shift angle sensor (Honda P/N 37700-HP5-601) for correct installation. If that doesn't fix it you may have to take the case apart and check/replace the gear position sensor.
The gear position sensor is only $26 at partzilla.
Honda Side by Side 2015 OEM Parts Diagram for Rear Crankcase Cover | Partzilla.com
There isn't too much that can go wrong so stay patient and you will be riding in no time!
I took the rear motor cover back off and found the shift angle sensor was in the wrong position. I fix the shift angle sensor and set my percentage at - 33% . It straightened everything out. My P5 is running better than it ever has. I appreciate the help from 906up and 99burban. Thanks works great.
View attachment 139482