Text can't repel text - only graphic objects can repel text below (under). So apply repel to the rectangle not the text (or the group - I think that should work as well).

Another related, possibly undocumented feature. Normally groups convert to a single graphic on the exported HTML. That is not useful for text panels where you really want the benefits of it being a group (you can drag it around as one), but want the text in this group t be real HTML text. Just apply the name HTMLText to the text, and that will force it to be real text. This is how all the text panels are done in the Designs Gallery.

Actually Soft Groups is another way of achieving the same effect because all items in a soft group are exported separately and not 'grouped' into a single graphic.