Hi, thank you for your reply. I fixed the functionality, but the anchor ID's are still in polish, regardless of which language. How can they be translated?
Element IDs are not something that are ordinarily available for translation.
You would need to complete your translation as normal, and then manually edit the translated post/page (in your case, with Elementor) and change the ID that way.
So in the back end from the list of posts in the default language (Polish) click the link to edit the post (not with Elementor). Then use the language switcher in the toolbar to switch to the desired language. A notice will warn you against editing the post, but you will need to continue. Then click the link to edit in Elementor, and make the changes to the IDs are required.
You will need to update your menus to use the different anchor links, as required.