A boat engine produces a fairly constant low-frequency drone, which happens to be exactly the kind of sound that active noise cancellation handles best. ANC works by having a microphone sample the incoming ambient noise and generating an inverted sound wave to cancel it out - a process called destructive interference - and that technique is far more effective against steady low-frequency rumble than against sudden sharp sounds like a slamming hatch or a shouted word.
That is why ANC earbuds noticeably quiet an engine drone or wind noise on deck, but will not fully block a crew member talking next to you - human speech sits in a higher, more variable frequency range that inverted-wave cancellation handles less cleanly, which is a physical limitation of the technology rather than a specific product being weak.
Wind is actually the harder case on a boat, since wind hitting the microphone port directly can create turbulence noise that overwhelms the ANC processing rather than being cancelled by it - this is why serious outdoor ANC earbuds add physical wind-noise reduction meshes over the microphones, not just software processing.
CairoVolt's Soundcore R50i NC page covers current ANC earbuds and how they handle steady low-frequency noise versus wind and voices.