Hi zaehlpixel,
I use the same code than you for my woocommerce store.
The problem is that I have to add the DHL tracking code, hit save, then mark the order as complete and save again.
If I just change the status to order complete, add the tracking number, hit save, it won’t include the tracking number in the order completion email.
Have you experienced the same issue?