The way saving works in Castle Crashers might be a little different to what you are used to, so hopefully, it’s just a case of exiting the game in the wrong way.
In order for your character progress to be saved before exiting the game completely, you first need to exit to the world map from the pause menu, which will then ensure your XP and gold progress is saved correctly.
As for level progress, there are certain save point levels that have to be completed, for previously finished levels to remain open on the world map the next time you boot the game.
So for instance, if you complete the level “Barbarian War”, but you don’t defeat the “Barbarian Boss” before shutting down the game, you would have to play the “Barbarian War” again the next time you booted.
For a full list of all the level save points, we have a helpful fan-made guide you can use! Just scroll down to the “Level Saves” section (all save point levels are marked in blue):