I think that when you hold down the "shift" key it may put the OSMODE into some sort of read only state. I modified your command to run 'osmode transparently after generating the points, and although everything looked like it worked from the command line, it still wouldn't change the OSMODE back.... the command executes faster than shift can be released.
The only thing I found that works is to break the process with an alert window. Try this, will alert if shift key is held down on last line created:
(defun C:test1 ()
(Setq oldMode (getvar "OSMODE"))
(setvar "OSMODE" 555)
(setq p1 (getpoint "\nFirst point: "))
(setq p2 (getpoint "\nSecond point: " p1))
(command ".LINE" p1 p2 "")
(if (acet-sys-shift-down) (alert "Release Shift Key Please"))
(setvar "OSMODE" oldMode)
(princ)
)