Error when packaging

You should try with engine build from source code. Check this : Building Unreal Engine from Source | Unreal Engine 5.1 Documentation

Building engine from source may takes very long time. In my case, with old hdd, it takes over 10 hours…

And, You should debug with backup copy of your project. If you open and save with differrernt engine version, you may not be able to open the project with launcher version engine.