Windows dual boot breaking bootloader

Windows 10 keeps breaking my endeavour OS bootloader. I don’t know why. My bootloader is supposed to be systemd boot but when it breaks it shows a grub command line prompt after it breaks.
Is there a way to fix this without completely reinstalling?
Is there a way to prevent windows from breaking the bootloader?

You may just need to change the default UEFI entry in your BIOS.

Look for one called “Linux Boot Manager”

I checked. The endeavour one got replaced by one called “ubuntu” and when I try to boot it, it just loads a grub command line.

That is probably an old entry did you ever ubuntu or a distro based on ubuntu installed on that machine in the past?

Either way, if you don’t have the linux boot manager option anymore, you will need to chroot using the arch-chroot article on our wiki page and run bootctl install

It’s not an old entry I never used ubuntu. II guess I’ve have to learn chroot and try that out.

What do you mean “Windows 10 keeps breaking bootloader”? When it happens?

So, here are things to read:
https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#Windows_changes_boot_order
https://wiki.archlinux.org/title/Systemd-boot#Troubleshooting