If you encounter a problem when erasing your partition during macOS installation, resize your efi partition to 200 mb using windows installation and you'll successfully erase the macOS journaled partition without errors.
I used a windows installer for this one because it's less complicated to make a bigger efi partition size.
Watch video HOW TO RESIZE EFI PARTITION (FIX MACOS DUAL BOOT COULD NOT ERASE PARTITION) online without registration, duration hours minute second in high quality. This video was added by user stephanie seromenes 23 October 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 976 once and liked it 7 people.