Hello
This behaviour is expected as per our documentation
"The slot's URL will be of the format http://sitename-slotname.azurewebsites.net
. To keep the URL length within necessary DNS limits, the site name will be truncated at 40 characters, the slot name will be truncated at 19 characters, and an additional 4 random characters will be appended to ensure the resulting domain name is unique."
https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#add-a-slot
I hope this helps provide you with the information you need. If it does, please make sure to mark the question as answered so it helps other people in future.
Kind regards
Alistair