You can either leave your phone screen on, disable Power Save, or plug your phone into the charger while using GPS with the screen off
Hello, We understand how frustrating it is when you are unable to use the GPS services on the phone. This article provides several suggestions to get the GPS working again, such as tips for improving the signal and checking the permissions. https://www.samsung.com/us/support/troubleshooting/TSG01001575/#check-permissions-for-gps-app
If these steps are not helpful, we recommend having the phone evaluated by an authorized service center. You can use the following link to find a list of service centers in the U.S. that can do the evaluation: http://www.samsung.com/us/support/service/location or by calling customer support at 1-800-726-7864.
For assistance outside the U.S., please use this link: https://www.samsung.com/us/common/visitlocationsite.html