Here is a manual method.
Select the same portrait in the new game menu.
Enable dev mode in starsector-core\data\config\settings.json.
"devMode":true,
Then press K for 25,000 credits each press, and L for 50,000XP. Until you have the money and XP level you had previously.
If you want to give yourself back the same ships you had before use LazyWizard's console commands. With that tool you can give yourself back the ships and weapons you had previously.
After you're done getting your character back to the previous level. You can disable dev mode and disable the console. You shouldn't need to use this method too often, but I understand the frustration of getting to level 40-50+ then having to start all over again for some mods and what not.