PWM should be applied to ENA or IN1/IN2 for L298N board for speed control
I'd use PWM on EN input. Motor will be driven in HIGH and left floating in LOW. The other method means it'll be shorted (= full on brake).

L298N is based on bipolar transistors. That means relatively big voltage drop between drivers Emitter and Collector (about 2V on each transistor), so there are big power losses (= heat).

Maybe something like LMD18200 could be used as unipolar replacement.