I also tried and first got the same result like you @DM13
Then I re-read the instructions on @RoDiSK website which sais place the event tracking code after the piwik code, changed it, not working yet.
Then I checked the website load behavior and checked that the scroll tracking script was merged into the merged scripts from the wordpress plugin “Autoptimize”. I put the script on the script exclude list of Autoptimize so that its not merged any more and now its working!
So check if your script is in the correct place and not merged by some performance plugins
By the way: I would love to see the scroll depth somewhere in Matomo core, but the solution @RoDiSK provides is a good start. Thank you!