Unless there is a gap in service of more than 26 weeks before you take up the new post I believe you stay in your existing scheme. See Page 9 in the Booklet :
So, to put it in perspective, Norin O'Sullivan, who was promoted to Garda Commissioner in 2014 and retired from her position in 2017, will have a pension of 50% of the salary she was on at that time as opposed to the
new pension scheme.
As I believe, a public servant must reside in the new post for 3 years to avail of getting the pension of 50% of the salary.