Hello,
These may have been reported already, but I wanted to share it just in case.
I'm running Forms 10.3.1.635 and I've noticed that if a field, section, etc., on the layout is highlighted when you delete unused variables, it also removes the selected field from the form.
To be clear, I am referring to separate/unrelated fields/variables, not the variable associated with a field still on the layout. To replicate this, create a form with two variables of any type. Refresh the page to ensure the variables are saved, then remove one from the layout and refresh the page a second time.
Highlight the remaining field, section, etc. (such as after you edit and click done), then click the Variables tab, check the box for the unused variable, and click the Delete icon; the variable will be deleted and the highlighted layout object will be removed from the form (this only affects the field on the layout, not its variables).
This seems fairly problematic because once a field on the layout pane has been selected, there is almost no way to deselect it meaning the problem will always occur unless the page is refreshed, you navigate to/from the page, click the form title section, or the variable is deleted before any fields have been edited/selected.
On a separate note, it seems that the interface also doesn't recognize that a field has been removed from the form until you refresh. For example, if I delete a field, then immediately try to delete the variable, the warning message will state that the field is still in use on that form.