ok i have checked the web and from want i have found the JVC is the same yellow and red.
whats happing is you have the switch DC to the permanent supple, and the permanent supple to the switched DC.
So when the key is in and yuou switch the car on you and then getting to 2 supples to the head unit with it needs to work, if you swap them over the permanent supple well be wiring in the the backup memery.
The reasion your losing it is as soon as you remove the key your removing the hold off voltage to the backup supple!!!!
Swap the 2 over and you should be fine (the main power connect normal have a join when you can swap them over to save cutting the wire!!!!
Hope this helps
Rob