We had the same issue in Magento 2.2.8. The reason is, when you try to review mail template there is not available order object.
I have fixed it in this way.
Created a template file in the custom theme:
Magento_Sales/templates/email/shipment/track.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php $_shipment = $block->getShipment() ?>
<?php $_order = $block->getOrder() ?>
<?php if ($_shipment && $_order): ?>
<?php $trackCollection = $_order->getTracksCollection($_shipment->getId()) ?>
<br />
<table class="shipment-track">
<thead>
<tr>
<th><?= /* @escapeNotVerified */ __('Shipped By') ?></th>
<th><?= /* @escapeNotVerified */ __('Tracking Number') ?></th>
</tr>
</thead>
<tbody>
<?php if ($trackCollection): ?>
<?php foreach ($trackCollection as $_item): ?>
<tr>
<td><?= $block->escapeHtml($_item->getTitle()) ?>:</td>
<td><?= $block->escapeHtml($_item->getNumber()) ?></td>
</tr>
<?php endforeach ?>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>