You can fully collapse the poles inside your bag and lock them with no problem.
There are dozens of different locking mechanisms, but most operate the principle of friction*: either twisting an internal screw forces wedges apart, or flicking shut an external lever squeezes the outside tube down on the inside one. The manufacturer is worried that using this friction unecessarily will cause it to wear out sooner.
Two thoughts:
It sounds like you have flick-lock poles (that compress the outside
tube). Most of those you can tighten or loosen the flick lock by
twisting it. This allows you to keep adding more pressure as the
metal fatigues when the poles age. If you can, try loosening that
micro-adjust before locking everything down for travel.
Regardless, leaving them locked for a few days while traveling won't
hurt them. If it does, then you should probably invest in
higher-quality poles. (Remember, these should last for many months
and thousands of miles of hiking... a few days of storage won't hurt
them).
ProTip: place the poles as close to the rigid back-stays on the inside of your pack as you can -- this will help protect them from being bent or crushed during baggage handling.
*Sidebar: If you can find a pair of the button-hole locks that don't rely on friction, get them! They will never fail unexpectedly.