Magnezone Evolution with rare candy not working

Yo how does evolving magneton work. I hit a max level for the area and forgot to evolve him, so I went to the islands and rare candied him and didn’t evolve. Does rare candying pokemon not work for these types of evolution? If so imma have to train another magnemite which won’t be horrible but still takes a bit of time.

Gonna copy and paste another answer from a similar question

Magnemite evolves into Magneton at Lv. 30

Magneton evolves into Magnezone when it is leveled up in the Whirl Islands.

I don’t think rare candy works as when I evolved mine it was via level up through xp so I have no clue if rare candies work or not.

Evolve in the CAVE, not outside of the cave, rare candy does work, just that those types of evos do not work outside the cave.