there are all sorts of guard you can buy
https://www.amazon.com/Rukket-Basketball-Attachment-Residential-Retention/dp/B07LC2JWR7
or just rig up some posts and netting alongside the neighbors fence