Prevent bluetooth app from running in background?

I have a Thunkable Classic app connecting to an Arduino (ESP32) via bluetooth. It works great, but it stays connected even when the Thunkable app is minimized (home button pressed on my phone), and if I don’t kill the app it kills the battery on my phone.

Is there some way to stop running when the Thunkable app doesn’t have focus?