I can not solve the problem. When creating a game object from the prefab, a triangle is drawn by the calculated points (it is drawn exactly and correctly) and I assign the same points to the vertices of PolygonCollider2D. According to my logic, the collider should coincide with the drawn triangle, but it leads to the side ...
pref.GetComponent<PolygonCollider2D>().points = new[]{point1, point2, point3}; pref.GetComponent<PolygonCollider2D>().SetPath(0, new[]{point1, point2, point3});