What you are experiencing is standard and expected behavior. When an app goes to the background, all timers and other background tasks (whether in Rx or not) stop.
In order for anybody to help you, you will need to explain what it is you are trying to do so we can come up with an alternative way to do it.
For example, in one of my apps, the user is supposed to be logged out after 5 minutes of inactivity, so I have this to make sure it happens:
let idleTime = 5 * 60
let foregroundTimerTripped = Observable.merge(
application.rx.methodInvoked(#selector(UIApplication.sendEvent(_:))).map(to: ()),
rx.methodInvoked(#selector(UIApplicationDelegate.applicationWillEnterForeground(_:))).map(to: ())
)
.debounce(.seconds(idleTime), scheduler: MainScheduler.instance)
let backgroundTime = rx.methodInvoked(#selector(UIApplicationDelegate.applicationDidEnterBackground(_:)))
.map(to: ())
.flatMap { Observable.just(Date()) }
let foregroundTime = rx.methodInvoked(#selector(UIApplicationDelegate.applicationWillEnterForeground(_:)))
.map(to: ())
.flatMap { Observable.just(Date()) }
let backgroundTimerTripped = foregroundTime
.withLatestFrom(backgroundTime) { $0.timeIntervalSince($1) }
.filter { $0 > TimeInterval(idleTime) }
.withLatestFrom(bearer)
let timeToLogout = Observable.merge(foregroundTimerTripped, backgroundTimerTripped)