I have an iPad 10 running iOS 18. I changed my icons to dark and it went well except for the Microsoft 365
Only first-party apps (Apple's apps) can use system-wide Dark Mode for icons at the moment.
The app icon for a third-party app - like Microsoft365 - is unlikely to have been updated for the new version of iOS - and even if they have already updated their app's code, it certainly will not be released before iOS 18 is released.