In this article on Android background execution limits, it states that background services will be killed off after a period of time, once the app is idle. It does not give any exceptions to this.
In an a specific apps battery settings, you can put the app into "Unrestricted mode", which explicitly states "Allow this app to use battery in the background without restrictions".
The article on Android background execution limits gives no mention of Unrestricted battery mode...which seems like an oversight and contradiction. It gives no exceptions to the rules, but at the same time, the unrestricted setting clearly states that it removes ALL restrictions.