It's difficult to tell. I can see what you're trying to accomplish but it's possible that Acrobat is giving priority to fillable fields over static objects (such as the rectangle) regardless of z-order (i.e. "bring to front", "send to back"...).
You can make objects invisible without having to write any script by selecting the objects which should be invisible and setting the Presence property, on the Object palette's Field tab, to
Invisible or
Hidden - Exclude from Layout. The former means the objects won't be visible but they will still be a factor in the way in which objects are placed on the form while the latter means they're totally hidden from the form.