@Kenzie
I was having the same issue. I have a Gallery with a checkbox on each item indicating which rows the user would like to update when they push Submit at the bottom. The CheckBox would add the item to a Collection which would be Patched later.
Outside of the Gallery, there is a Search Box to filter the items in the Gallery. Whenever you enter text in the Search Box, the Gallery would filter, and the CheckBoxes would all clear. The Collection would stay, but this is very confusing to the user.
To solve this, I created a second Collection that would keep the records of which CheckBoxes to keep Checked, and Default is set to this Collection:
OnCheck:
If(IsBlank(LookUp(Boxes,Value=ThisItem.id)),Collect(Boxes,id));
OnUncheck:
Remove(Boxes,LookUp(Boxes,Value=ThisItem.id))
Default:
!IsBlank(LookUp(Boxes,Value=ThisItem.id))