Well, in theory, and in my experience, the use of a DC current through a winding or an induction motor will NOT "lock" it in the sense that appears to be wanted.,
The stationary field does nothing unless a conductor moves in it. The rotation of the "rotor cage" produces a current, and a braking effect. So the result is that the rotor will move, but has a somewhat damped response... the amount of damping depending on the magnetic field established. It presents as somewhat similar to a "viscous" damping, with less resistance to slow movement. That is exactly what you would expect from theory.
You CAN hold that current all day, if you like.... by using a low voltage, and not attempting to run FLA at DC, which is not generally needed. Yes, the stronger the field, the more nearly locked the motor is, but it still moves. Just a fraction of FLA will produce a very considerable viscous braking effect in many motors.
The use of the relay in the VFD to operate a standard brake or locking mechanism is both more positive, and may be easier. Of course it could also operate a contactor for a DC source, which would naturally need to be interlocked with the power contactors.
An AC current would potentially do some "locking". A single phased motor that is not turning can be very hard to turn, and does not seem to give that same "viscous" sensation.