Making and Saving Selections in a Filtered List

Below is a hypothetical situation based on a real-world example I’m assisting my team in resolving. We have a list where each row can be selected and saved. A filter allows a user to narrow the result set. The issue we are having is determining what selections should be saved as filter is applied and selections are made and filter is updated and more selections are made. Do we save in aggregate or only what is in view based on the current filter applied. Hopefully the flow below articulates the problem well enough that people can help me in finding an appropriate solution. Any feedback is appreciated.