Due to the network restrictions, you can't listen for TCP requests unless they're being received over ports 80 or 443.
I did see mentions of HL7 and FHIR, so one thing you can look at utilizing is What is Azure Health Data Services? | Microsoft Learn or What is Azure API for FHIR? - Azure API for FHIR | Microsoft Learn. These services are more aligned to working with health data. However, if it isn't health data you're really looking at, then the best option to listen for specific TCP messages would be to utilize an Azure Virtual Machine configured to listen for those messages and your custom python code to process them.