Looks like you enabled animation preview - see that highlighted icon on the toolbar in your screenshot.
You should always be able to close animation editor by pressing Esc button.
I tried pressing esc but nothing happened
edit: It is somehow fixed, but it only did that after I pressed multiple buttons at the same time for some strange reason, also thank you for the help!