This is an asynchronous issue. The tryFatalErrorRecovery() method works correctly when a fatal error has occurred. Use view.watch() to look for a fatal error, and then use the tryFatalErrorRecovery() method. Refer to https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#fatalError for more information.
view.watch("fatalError", function(error) {
if(error) {
console.error("Fatal Error! View has lost its WebGL context. Attempting to recover...");
view.tryFatalErrorRecovery();
}
});