No. There's literally no guaranteed way to find out whether the user closed the browser window - unless you establish a poll and listen to a heartbeat emitting from client side JS (an ajax call to your server) periodically.
Upon sever not getting the heartbeat for some time, you can conclude that the browser window was closed/crashed.