The Flight Officers here are more than capable to respond to an electrical fire in flight and that is to get the beast on the ground as quickly as they can. It is all embedded indelibly in the mind. Reaction is immediate.
That quick reaction includes/may include donning oxygen masks, establishing communication between the pilots and, depending on the emergency, a number of further memory items ... concluding in a landing at the nearest suitable airport.
Disabling a transponder, transmitting 'all right, good night' and turning/climbing to FL450 does not form any part of the emergency procedure.
Selecting an emergency squawk, transmitting a (most likely, stressed/muffled) message to ATC, turning toward nearest/departure/alternate airfield and DESCENDING does ...