'How to refresh a filter onEdit() in Google sheets when editing a different sheet?

I am trying to get a custom data filter to refresh when editing a cell. However the answers I have found such as https://stackoverflow.com/a/67799857/5438343 are for when you edit a cell on the same sheet as the filter. However, in my case I wish to force the filter to refresh when I edit a cell on a different sheet, and can't quite work out how to do it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source