The problem is fixed in iTunes Version 12.9.5.5
I had to run updates manually (from “System Preferences > Software Updates”) in order to get the update, and it was a very slow update (took about 30 minutes to complete).
If, after the update, the track lengths do not update automatically, just right click on the song and select “Song Info”.