Read encoder speed while motor running

I a not able to read the encoder from Arduino while the motor is running.
I run the motor by sending the .controller.input_vel command.
But the motor stops as soon as I send an encoder.vel_estimate or encoder.shadow_count command.

When I do the same in odrivetool, everything runs fine together, but when commanded from Arduino I have this problem.

What is the correct way to get encoder values through Arduino while the motor is running? Am I missing an additional command?