magento2 – Show customer prefix in sales email

I want to show the customer prefix in the sales email.

I changed

{{trans "Hello,"}} {{trans "%customer_name," customer_name=$order_data.customer_name}}

to

{{trans "Hello,"}} {{trans "%prefix" prefix=$order_data.customer_prefix}} {{trans "%customer_name," customer_name=$order_data.customer_name}}

but sending the email, the sales email just contains the following error message:

Notice: Undefined index: customer_prefix in /var/www/magento2/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php on line 109