Let $ V_1, V_2, V_3 \cdots V_n$ be the vertices of the polygon.
WLOG $ V_1V_2 = V_2V_3 = 1$ then by triangle inequality on $ V_1V_2V_3$, $ V_1V_3 < V_1V_2 + V_2V_3$
If $ n\ge 4$ then $ V_1V_3 = 1$ then $ V_1V_2V_3$ is an equilateral triangle.
Suppose that $ n \ge 6$ then $ V_1V_4$ and $ V_2V_4$ are diagonals then
triangle inequality on triangle $ V_1V_2V_4$ implies $ V_1V_4 = V_2V_4$
Similarly $ V_1V_5 = V_2V_5$ however $ V_3$, $ V_4$ and $ V_5$ are on the perpendicular bisector of $ V_1V_2$ Contradiction, therefore $ n \le 5$
and similarly with $ V_2V_5 = V_3V_5$ to get the example for $ n = 5$ and concave polygon
if you add the convex condition $ n = 4$ is the maximum.