How do I hide the purchase note in the WooCommerce ‘order completed’ email?

I think you’re correct about that code snippet only checking the for the availability of the email. But you can probably still make your alternative approach work: the WC_Email classes set $sending to true when they’re in the process of sending. So you could check something like:

WC()->mailer()->emails["WC_Email_Customer_Completed_Order"]->sending