The only L298N I find in core parts works fine
I would suggest (as I did with the first time this was brought up) that you upload the failing sketch (the .fzz file, upload is 7th icon from the left in the reply menu.) With that (which will likely include what ever part you are having problems with as it doesn’t appear to be in core parts) I can figure out what is wrong. Without a part to work from I can’t.
edit
It seems likely you are using this part
which is indeed broken
There is a corrected version which should work correctly later in that same thread here:
that should work correctly. A google search of the form “fritzing part L298N” finds a variety of other posts for various versions.
Peter