DC Motor only works with programmer
It would not run at all with the schematic as shown,. So L1C2 must be reversed on the schematic.

But servo motors demand heavy current only during position command changes, (which in this case may be >> 100mA ) so the low power L05 regulator is possibly suffering from overload while the voltage drops to limit the current.

Make sure you scope the voltage and ensure this is not the problem.  The LC values are not ideal as a low pass filter breakpoint and more filtering and care with analog ground not sharing motor current is essential.

In short, no pun intended, without reviewing your code, you seem to be having power supply issues and no report of servo surge current specs.

Try a PC PSU until you learn how to specify and choose a better supply.