It mostly happened to me after I switched pinned recipes while I'm at an engineer (like switch from "overcharged" to "armored" power plant). So my solution is to pin the recipe i want, log out entirely from the game and restart. About 50% of the time the new recipe hasn't remained pinned. I pin it again and this time it holds.