How do I find out what app is showing a toast? Several times a day my Android phone (Samsung Galaxy A51, Android 11) is showing this toast

We're having trouble connecting. Check your network connection and try again.

If I stay offline this toast will return every few minutes. How can I find out which app is posting these toasts. And most importantly how do I get rid of them? Long-pressing the toast doesn't show anything.
You could use the Toast Source app for that. It not only integrates the app icon and name with each toast message (first screenshot below), but also gives you a history of toasts you received and which app sent it:

 
Toast Source (source: Google Play; click images for larger variants)

Quite privacy friendly it doesn't even require the Internet permission (so no ads either). But as it uses accessibility services, it's unclear whether it will survice Googles current purge.