Technicall an axis never "locks". Due to the motors being steppers, the last applied current is just being held to hold the stepper in position, which in turn then acts as a locking current.
There are several places in the firmware that can influence this.
One of them is in Configuration_adv.h
//default stepper release if idle
#define DEFAULT_STEPPER_DEACTIVE_TIME 60
I'm not quite sure whether this is calculated for individual steppers, but it is most noticeable after moving an axis manually from the software, because for around 60seconds the motors will continue to buzz.
The other one is in Configuration.h
// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z true
#define DISABLE_E false // For all extruders
I think this is, where your problem lies, because if one of these is set as "true" (it actually is the Z-Axis in the K8200 firmware), the default deactive time from above is not applied to this stepper, but it is turned off immediately, once the next few steps do have nothing to do for this stepper. To change this behaviour, you just have to change the flag to "false" and reupload the firmware to the printer.
There is a bit more to this: The firmware works in blocks. About the next 16 G-Code lines to print are already loaded into the printer memory and calculated. (the "look ahead feature" basically") The stepper is not
deactivated if any of these 16 blocks contains a new step command for the axis. So if you have really small simple parts (hollow cube, for example) that already has a new z-step within the next 16 blocks, then the z-axis is not deactivated although the 15 lines of G-Code until then do not contain any changes in the Z-direction. That's why small calibration print may look better than final prints. It also may be a bit deceiving when moving the axis manually from the software, because if there are no next 16 lines of G-Code, it will not be deactivated, but turned off after the 60 seconds idle time mentioned above.
To be honest: It's beyond me, why this feature is there in the first place.
There is a third method that can influence it and this is the M84
i.e. M84 S10
sets the idle time to ten seconds. Although I haven't seen it used yet, this G-Code can take flags (XYZE), so I'd assume that if supported by the firmware different idle times for the different axes can be applied. So just in case: Check your Start- and End-G-Code in Repetier (or whatever Software you use) for this one. It will probably appear without any flas as plain M84 in the End-G-Code - and this is about the only place where it's supposed to be.