If you have tried everything you could... I suggest taking the phone to an authorized service center where they have the tools to better assist you.
^ one other option is to recreate the issue and immediately file an Issue/Error report using the Samsung Members app. It should catch any sort of Software issues if the problem you're having is software related (or even some hardware stuff too). It's important to submit the report soon after issue is recreated for log collection to catch the problem. Good luck
lastly, it's always good to mention what device/model you have and what version it's on when posting on none-model specific forum