Rolling up the comments and providing more details on the automation part.
I can say if it was for Email-to-Case. I would imagine the same for Apex Email Services too, because while creating an email in there, the domain is created by Salesforce automatically. I can think that that during refresh it won't be retained because anything in the sandbox will be deleted and then refreshed from Production. And any custom email addresses in email service will most likely not be copied from Production either and that it needs to be created again. I don't see any docs for this, only way to verify will be to test it
That you have confirmed the aforementioned behavior after a refresh, that even custom Email Services are not retained and that you need to create it after a refresh, confirms the understanding.
For automating creation of the Email Addresses in the Email Services, you can actually utilize the EmailServicesFunction available with Metadata API. Refer to details on EmailServicesAddress in the documentation link, where you can create an EmailServiceAddress records. These are the records which represents all the email addresses configured in the system (including standard email to case as well as I observed). Utilizing this API is what you need here for your automation.
Hope this helps.