Performing algebraic transformations with syntactic transformations sometimes requires indirection:
2 n (r + h) Sin[\[Pi]/n] /. Sin[\[Pi]/n] -> pn/n
(* 2 pn (h + r) *)
Usually you need to replace a simple and unique (or characteristic) factor with its equivalent.
Alternatively, you can try algebraic functions:
Eliminate[{z == 2 n (r + h) Sin[\[Pi]/n], pn == n Sin[\[Pi]/n]}, Sin[\[Pi]/n]]
(* z == pn (2 h + 2 r) *)
z /. First@
Solve[{z == 2 n (r + h) Sin[\[Pi]/n], pn == n Sin[\[Pi]/n]},
z, {Sin[\[Pi]/n]}] // Factor
(* 2 pn (h + r) *)
Reduce[{z == 2 n (r + h) Sin[\[Pi]/n], pn == n Sin[\[Pi]/n]}, {z}, {Sin[\[Pi]/n], n}] // Factor
(* (pn == 0 && z == 0) || z == 2 pn (h + r) *)