There looks to be 2 problems here:
Household LED units rated at 12V are designed to be used with a fixed voltage AC transformer or sometimes DC power supply and may not work i.e. fail with the range of voltages on a boat which can go up to 14.8V on charge and higher if equalising. There will also be spikes on the supply line from the back EMF generated from high current
devices such as anchor windlass
, starter motors and the like which will give transient voltages well above 12V. The units I use are rated 8-30V and do last well. Look for units designed for RVs, Caravans or marine
A 12V LED has a built in regulator
and they are either designed for dimming or not. You cannot dim one not designed for it.
Sorry if this sounds a bit brutal