I don't think background location works anymore. My GPS logger I use for cycling gets killed after about 20 minutes if it isn't the currently open app when I turn off the screen.
This is not Android thing (yet). Just some vendors, start killing apps in the background. However this is developers nightmare, as they can't deliver consistent experience across all devices. IMO background tracking (with all restrictions, killing...) should be handled directly by AndroidOS, not by vendors. Checkout https://dontkillmyapp.com