Direct motor control with ROS2

Hello everyone!
I`m trying to control motors directly with ros2 and pixhawck 6X (px4 1.14 firmware). But I got stuck with the problem. When I start offboard mode and send ActuatorMotors message, the motors change their speed, but only once in some period of time (then continuing rotation with the same speed as after arming). In simulation the same code works well. Do you have any ideas how to fix this?
Thanks in advance!

Probably they get disarmed. If you dont takeoff under 10 seconds the drone disarms. You can change this parameter COM_DISARM_PRFLT.

Are you connected to the drone by telemetry? What does the QGC say?