I connected the P2 Motion Sensor to Aqara Home, Apple Home and Home Assistant. It works for me without any problems.
It is important that you only use the sticker with the Matter code the first time and then use the code in the app (Multi-Admin).
Here the complete process:
Regarding the error message:
There could also be other reasons for the error message, such as a faulty IPv6 configuration in HA, blocked mDNS (Multicast DNS) or subnets/VLANs, an active VPN on the smartphone, incorrect thread network credentials or the p2 sensor is too far away and has no connection.
First, check whether Home Assistant has received a correct IPv6 address under: