Pagination becomes confusing when the current page survives a filter change that no longer has enough results. The fix is simple: reset to the first page whenever the result set changes.
This behavior respects the user’s intent. They asked for a new subset, so the interface should show the beginning of that subset.
Small details like this make a content interface feel more reliable.