The behavior changes, it resorts to what amounts to an undo command. Would make sense that esc/cancel would be interpreted as a "error" I guess I'm curious now why AutoCAD determines that an error involves making a new UCS.
If
Esc is used to terminate a program, this is handled as an error and as such, AutoCAD will evaluate the
*error* function (if defined by the program) or the standard AutoLISP error handler.
If the code has defined a local
*error* function (or indeed, if another program has redefined the
*error* function and hasn't declared it local to the program), then AutoCAD will evaluate this redefined
*error* function upon the user pressing
Esc. Therefore, if such
*error* functions contain expressions to reset the UCS, or perform an Undo, then this might explain the behaviour you are witnessing.