XL4015 dc-dc buck converter and servo problem

Hello,
I'm facing the problem with xl4015 buck converter. I powered my buck converter with two 18650 baterries and set buck converter's output voltage to 6V. When I run mg995 servo motor, at starting moment, my buck converter's output voltage spikes to 6.8V and then gets back to 6v. I tried adding 470uF, 1000uF, 2200uF, 3500uF capacitors between converter's output pads, but that didn't help.
The strange part is that when a dc motor (controlled with l298n h-bridge) and servo are running at the same time, the buck converter's output voltage remains stable.
What could be the problem?