I think a lot of things can be consolidated/simplified, and you need to get rid of an extraneous left parenthesis at the right end of one of the lines, but as to the specific issue of clearing the cursor as you move around, try this adjustment:
....
(setq pt3 (list pt3x pt3y))
(setq pt4 (list pt4x pt4y))
(redraw);;;;; added this
(grdraw pt1 pt2 1)
(grdraw pt2 pt3 1)
(grdraw pt3 pt4 1)
(grdraw pt4 pt1 1)
;((command "_.DELAY" 100)
;;;;; eliminated these (grdraw pt1 pt2 -1)
;;;;; (grdraw pt2 pt3 -1)
;;;;; (grdraw pt3 pt4 -1)
;;;;; (grdraw pt4 pt1 -1)
)
.....
You would need to build an additional (redraw) into whatever happens when you've picked something or whatever you're after, so the last temporary cursor will also be cleared.
There's also a way to have it actually draw the cursor shape with (entmakex), and erase the one it just drew and draw a new one whenever the cursor moves. That gives you some possibilities that (grdraw) [or (grvecs)] won't, such as Polyline width, or to use a Circle instead of a square. Here are some relevant snippets from another routine of mine, adjusted in a way that may serve your purposes [adjustments untested], including a much more concise way of determing the four corners:
....
(while
(and (not done) (setq cur (grread T 12 0)))
(cond
((= (car cur) 5); 5 = first number in (grread) return from moving pointing device
(if square (entdel square)); eliminate previous one, if any
(setq
pos (list (caadr cur) (cadadr cur)); X,Y only of cursor position
cor1 (mapcar '- pos '(5 5)); lower left
cor2 (mapcar '+ pos '(5 -5)); lower right
cor3 (mapcar '+ pos '(5 5)); upper right
cor4 (mapcar '+ pos '(-5 5)); upper left
); setq
(setq square (entmakex (.... entity data for a Polyline, including those four corners as vertex entries ....)))
); 5 condition
((= (car cur) 3); 3 = picked a point
(entdel square); eliminate temporary cursor
(setq done T); end (while) loop
(.... do whatever is appropriate with point picked ....)
); 3 condition
;; (.... other conditions are possible, such as keyboard entry ....)
); cond - grread possibilities
); while
....
Kent Cooper, AIA