Magnetic anisotropy of metal functionalized phthalocyanine 2D networks