Hi
A Samsung phone might go into sleep mode while on a call for a few reasons, including the proximity sensor, screen timeout, or the Adaptive brightness feature.
Proximity sensor
The proximity sensor turns off the screen when you hold the phone to your ear to prevent accidental touches.
If the screen doesn't turn on during or after calls, the proximity sensor might be blocked by a case, sticker, or screen protector.
You can try removing any accessories and cleaning the sensor with a soft cloth.
Screen timeout
The screen timeout feature automatically turns off the display after a certain amount of time to save battery.
You can change how long your phone screen stays on by going to Settings, then Display, then Screen Timeout.
Adaptive brightness
The Adaptive brightness feature automatically adjusts the screen brightness.
You can deactivate this feature by going to Settings, then Display, and turning off the switch next to Adaptive brightness.
Keep screen on while viewing
This feature keeps the screen on while you're looking at it. It's on by default, but you can check manually.
You can also try restarting your phone