The role of defects in the formation of the multidomain state of easy-plane antiferromagnets with magnetoelastic interaction