On the rationality of Poincaré series of Gorenstein algebras via Macaulay's correspondence