Take it to Pledge Grove (behind Alder's house north of Floccesy Town).
I did the same thing you did (taught Secret Sword in White), so what I did I taught him Toxic over Secret Sword, then took him to Pledge Grove & re-taught it to him.
As long as the little pony knows Secret Sword, he will stay in Resolute form.
Okay. If you have Secret Sword on it already, it will automatically turn into Keldeo-R when you bring it to Pledge Grove to the Rock.