Unlike the previous N64 version of the game, Deku, Zora, Goron and Fierce Deity do not have a Display List (model) of the Deku Stick in their overall in-game model. So when glitching the game into drawing a Deku Stick with any of the transformation masks, the way the stick gets lit on fire works rather differently. Is it not understood why this happens, but when a Deku Stick is lit up as Deku/Zora the flame appears where ever the sword/stick was last swung. The flame seems to appear in the spot where the slash hitbox was last active.
The slash hitbox detection for the flame to appear does not reset upon transforming into a different form, it will only reset by leaving the area you're in. After catching the stick on fire as Deku, you can bring the flame to you by deku spinning. The flame will visibly follow Link as long as there any kind of slash hitbox active. The flame will again just stop in place once the hitbox deactivates (aka the attack animation is done.) The same applies to Zora using his fins to attack. The Deku Stick acts just like attacking regularly with the B button. Goron punches work differently, so using the stick as goron just acts like regular punches without any sort of "slash" necessarily that's needed for this to work. Fierce Deity (after having Blank B, so he doesn't automatically pull his two-handed sword) will store the flame the same way Deku and Zora do. Everything applies the same for Fierce Deity.
As Deku in this game we can easily get Down A RI in almost any area with water Deku can hop on. By doing so, Deku can just pull out a stick and get near a torch with fire to lit a Deku Stick and get Flame Storage. As for Fierce Deity, first Fierce Deity needs to be swordless so the B button is grayed out. The easiest way in theory would be to climb on Epona without having the bow/quiver in your inventory. Unmount Epona and FD will be swordless, now just perform Down A, pull a stick out and get close to a torch to lit up the deku stick.
This method of RI applies to Zora as sadly there's not way to get Zora's B button blank. After successfully performing text storage, just pull out a stick and get close to a torch to lit it on fire.
Below, is a video demonstration of Flame Storage: