No, it's not the same. Defender for Office 365 can be purchased as standalone plan, and is included in Office 365 E5 as well as all the Microsoft 365 "bundles". If you are using one of these, you are all set. If you are using the standalone Azure AD P1, Defender for O365 is not included.
Azure P1 License and Office 365 P1
Hello
We are going to buy Azure P1 Standalone license to increase efficiency towards controlling groups, roles conditional access and staff like that. I've been working around Microsoft 365 Defender Secure Score, so there is one recommendation about safety "Create Safe Links policies for email messages" to be fixed, so when i entered link to read more details about it i have encountered that is needs "Microsoft Defender for Office 365 P1 is needed" license....i have been searching around all day, Microsoft licensing is quite difficult thing to understand fully, so when i search Office 365 P1 i get Azure P1 as a result, so i'm interested does Azure P1 Standalone license is same as Office 365 P1?