L298N heating up when driving a Nema 17 with Arduino
It pays to read specs.

Standard Voltage: 2V
Phase current: 1.2A
Phase resistance: 1.7 ohm


The Hi+Lo side drivers have some specs which are roughly equivalent to 1 ohm per side, so you have...    

Pd= 5V^2/3.7=6.75W per phase x2=13.5W with 2/3.7=54% of the total power dumped into the heatsink which based on about 1sq"/W (my rule of thumb) makes this heatsink too hot to touch and your current limiting inadequate.

Try PWM to reduce the current on idle.

They say it's OK to use 12V on these motors, but not on idle after step complete.  The thermal limit is 2V average across the windings.