I have enabled location / geo-tagging of photos on my phone (Samsung S10+, prior to that, S7 - same results). Photos taken generally record location information as expected. However - if I take advantage of the phone's ability to launch the camera app from the 'lock' screen (that is, without unlocking the phone by PIN/fingerprint/face recognition, etc) then location information is NOT recorded.
I can see how this would be an 'unintended consequence' behavior; if you don't unlock the phone session, then the camera app may be launched in a different 'security context', and in that context, it may not be able to read the internal GPS info. However - I cannot think of any scenario where allowing the camera app from a locked phone to access location information could be a problem, and I'd like to change this behavior if possible. I rely heavily on the 'geo-tagging' information stored in photos and it is quite often a pain to unlock the phone while hiking, etc (fingerprint reader still not exactly perfect, and having to enter PIN when trying to capture a 'scene' not always desirable).
I've tried every setting I can find relating to security and location services, and I've searched high and low for answers. Part of the challenge here is, keywords such as 'lock', 'location', 'camera' etc result in a high number of hits, and 99.9% of people seem to be asking for how to enable location tagging in general, not specifically when the camera is launched from the lock screen.