Update on this topic:
it seems that the error is occurring due to a bug in UE 5.4
I cannot verify that 100% but here is what I tried and how I could solve the problem for now:
The current solution was created with those two options disabled:
The solution was then built with Visual Studio 2022 Community edition.
I then enabled the two options again as shown in the screenshots , rebuilt the solution and started live coding and voila: everything worked as expected.
I later disabled the two options again and again had some strange behavior which disappeared after enabling those two options again and starting live coding. Since then I kept those two options enabled and now for each change have to use live coding.