Apple assumes the user is backing up their computer and Apple will feel free to erase or even replace the storage drive without asking permission. Chances are Apple listed this in the paperwork you signed.
An independent AASP, may offer to back up your data if necessary if you ask them to do so (at an additional cost). If an AASP is performing the repair in their own shop, then your data is probably Ok, but not guaranteed. If the AASP shipped the laptop to an Apple repair depot, then the Apple repair depot will not ask permission to erase or even replace the storage device if it becomes necessary during the course of the repair.
You should always have good verified working backups of your computers and data. Having backups on at least two different drives is also recommended.
Here is a great article detailing why iCloud is not a backup:
https://www.backblaze.com/blog/dont-get-trapped-icloud/
Here is another article:
https://www.macworld.com/article/3301200/why-you-shouldnt-rely-on-icloud-drive-for-backups.html
Edit: The answer to your question is data loss is probably slim, but not impossible. If you happen to have the MBPro 13" non-touchbar model with the potential SSD issue, then the chances are much higher you may lose your data. You just never know.
https://support.apple.com/13-inch-macbook-pro-solid-state-drive-service