I can't see anything offhand, you might try
Autodesk.AutoCAD.Internal.Utils.SelectObjects() instead of SetImpliedSelection()
Unless you need properties of the rectangles somewhere else, I'd recommend storing the lstRec as a list of ObjectIDs. I've found that storing and passing ObjectIDs is superior to storing and passing Entities.
I don't write VB.NET, but it might look something like this:
Dim lstRec As New List (Of ObjectId)' <-store ObjectID instead of rectangle
Dim Prsel As PromptSelectionResult = ed.GetSelection (New PromptSelectionOptions () With {
.MessageForAdding = "Select Pline:"})
With cadTrans
For Each ID As ObjectId In Prsel.Value.GetObjectIds
Dim pli As Polyline = DirectCast (.GetObject (ID, OpenMode.ForRead), Polyline)
If isSquare (pli)
lstRec.Add (ID)
End If
next
...
End with
ed.SetImpliedSelection (lstRec.ToArray()) 'from gile
ed.regen
ed.UpdateScreen ()
'Continue code...