I feel you.. I have it the same.
I personally resigned on trying to solve this issue. What I am doing instead is, to have this procrastination be productive. When watching youtube, I go see coding videos, or survival. Or instead of music I go listen to Python podcasts to keep in loop on new features. Or I go solve some leetcode problems. Heck I even do chores around the house. Therefore, I know that I should be doing work stuff, but at least I am not wasting time.