Migrating to Azure SQL Database can sometimes cause headaches because of the differences between the on-premise SQL Server version and Azure SQL database. This may clear things up abit:
Bron: Resolving T-SQL differences-migration-Azure SQL Database | Microsoft Docs