I read that if location is set to "only while using the app" the app can access the location only when it's visible (and up to 2 minutes after closing). After that, Android blocks all requests to location.
However, if an app is running all the time it can access location since it's running as a foreground service (any app that's listed under notifications).
If an app is running in the foreground and you want it stopped, pull down the notifications drawer twice. If there are any apps running foreground services, you'll see a circular icon in the lower right-hand corner with a number in it next to settings or profile switcher. Tap that and tap stop for any app you'd like.