I am posting again regarding the issue I previously raised. I conducted tests on devices running iPad OS 18.1 and iOS 18.0 to see if they could connect without being on the same wireless AP using the Multiconnectivity framework, and the results were the same as before.
In search of alternative methods for communication between devices without connecting to the same wireless AP, I discovered the following technology:
https://developer.apple.com/documentation/technotes/tn3151-choosing-the-right-networking-api#Peer-to-peer-networking
After downloading and running the sample from the link below, I found that data transmission and reception between devices could be done freely:
https://developer.apple.com/documentation/network/building-a-custom-peer-to-peer-protocol
I hope this information helps other developers facing the same issue.