This might be because Aftership provides their own tracking page with an Aftership subdomain in the URL. So, you must have redirected the URL to make it a part of your store’s page. The security issue might be because this is an external page and not a part of your store. You will have to contact Aftership support regarding solving this issue.
If the issue is still not solved, you can use the Shipment tracking & notify app, which allows you to have Order Tracking Lookup Page within your Shopify store. This page is completely integrated and uses the same design as your store. The app also automated the complete tracking process by sending tracking notifications to customers whenever there is a change in the order status.