Yes, there are memory leaks. In many places of the game code, not only UI.
Some times refreshing the UI (F5) give you a few more minutes; but don’t count for it to be a long-term solution.
However, sadly, development of Stonehearth base game was discontinued years ago!
I would suggest you look into the mod “ACE” and check out the ACE discord server.
I haven’t kept up with the details over the years, but I would guess ACE solves some issues.
The active “ACE people” are also more updated on what can cause issues and ways to go around them. Maybe they have other suggestions, too!
Best of luck!