Timeline and AnimationClip problem

I have looked forums up and Down and tried to find a solution for my issue but with no luck and i cant find any documentation around it.

I am making a program that via code can create animations and put them into the timeline and everything Works fine.
I dont Work with any editor classes so it can build it just fine aswell.
But when i am trying to open the standalone build and create these animations i get an error message saying that i cant SetCurve on none legacy AnimationClips
so my Work the past weeks is worthless if i cant find a solution. How can i Work around that and why is this limitation put into the stand alone build when it Works fine in the editor.
I use no external plugins and nothing that shouldnt Work outside the editor.

Hope you can help me out here

Yes, you cannot create animation clips in a standalone player. The animation clip data is baked during building.

You can create legacy animation clips but those are not supported by the playable system (and thus not supported by timeline).

Depending on what you are trying to achieve, an alternate solution may be to create a custom timeline track that takes AnimationCurves and animates the specific properties on a gameObject.

Okay. I know that it is baked during building. I just can’t see why it is possible to create timeline via code + Create AnimationClip via code + create all the curves via code + apply all the curves to the animation via code AND all of that works in a stand alone build.

BUT when i change the bool for AnimationClip Legacy to false it doesn’t work anymore. In the editor it is not baked and it runs fine so it is possible for it to work that way. It just seems like Unity has decided that it should not be possible for some reason i dont understand. Plus forcing people to work with it in the editor and building without being able to creat animations on the standalone build seems like a very static workflow… I can create my own custom timeline and work with that but unity has great tools implemented i could use for that purpose with all the functionality so it seems a bit weird that it has this limitation on it.

I am hoping it can be updated via a patch by unity OR that there is something that i am missing here….