The problem is not the code
I have checked with a friend, where it works
No, what I meant was that it works on his PC.
No, the COM Port is not hard coded. In the program it is on COM 4 and in the Arduino Desktop App Programm it is also on COM 4 and it works
where it gets interesting.