15301 wrong focus when deleting wp filter

[``* `#15301` Wrong focus when deleting work package filter``](https://www.openproject.org/work_packages/15301)

Re-implements functionality of #1869 considering the following two regressions:
* https://www.openproject.org/work_packages/15614
* https://www.openproject.org/work_packages/15604