I think I was able to find an answer.
I’m not sure if this is good practice, but I am just forcing the I frame to resize as recommended in this question:
When someone switches tabs the frame is automatically reset like this:
var ifr = document.getElementById('discourse-embed-frame');
ifr.src = ifr.src;
Thanks for letting me work through this, and I hope this is useful to someone else some day.
Please let me know if this is bad practice.