black wire 2 - LI2 - no assigment - can be used for reverse
If only the LI1 forward is connected and the LI2 is not then how do you think the spindle will change the direction?
What do you think which of the signals you have connected will tell the VFD to change direction?
I mean you have only one analog signal which can only give the speed command and you only have one more signal connected.
The only possible answer to my own questions is if the VFD is configured with the LI1 signal as direction signal and there is no start signal, just the analog, which is by the way is a dangerous setup.
If you really have it wired like how you wrote then simply remove the M3 output pin config and also remove the M4 output pin and just leave the Dir pin in the PWM spindle setting, so the dir will switch the forward high or low depending on M3 or M4. And the analog signal will switch the spindle on.
But again, this setup is dangerous because it is missing the safety start signal and I'm not recommending to do the wiring this way.