Kiwi.com has this feature.
First enter your origin and destination cities.
Next, as the departure date, enter a date range over the whole period you are looking for weekend getaways. It can be over a period of several months.
For the return date, enter a Time of stay as 2-3 days:
Then search. After the search is made, click "Filters". And click the "Days and times" filter. You can now apply filters for time of the day, and which days of the week to possibly leave and return. So click leave Friday afternoon and return on Sunday or Monday:
The results will be automatically updated.
Note that since we want to include both flights that return late on Sunday and early on Monday we had to leave the return time filter at all day. This will lead to some results that are not relevant, like returning early on Sunday and late on Monday. So ignore them. Or to avoid those unwanted results, first filter for only Sunday evening, and next for only Monday morning.