Hello @Diogo Correia,
welcome to this moderated Azure community forum.
it seems you want to set a 'network-scoped alias for the container' like seen here.
I expected you should be able to set a network alias using the Azure IoT Edge module container create options.
Then I found this issue that seems to tell that this is not possible in an EFLOW situation, this technology you use.
I recommend starting a new issue on the GitHub page so you get support right from the team behind Azure IoT Edge.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.