@raybiko Well, yes. This is a phone. The idea is to throttle as much as possible when the device is sleeping. Hence the repeated advice not to reason about your phone in the same way you reason about a raspberry pi, for instance.
However, if battery life is not a concern for you, you could try disabling app suspension for the Terminal app in the Ubuntu Tweak Tool, available in the Open Store.