akrasia
akrasia /əˈkreɪzɪə , əˈkrasɪə / (also acrasia)
▸ noun [mass noun] mainly Philosophy the state of mind in which someone acts against their better judgement through weakness of will.
– ORIGIN early 19th century : from Greek, from a- ‘without’ + kratos ‘power, strength’. The term is used especially with reference to Aristotle's Nicomachean Ethics.
Procrastination would be one such behaviour, certainly. An example of a non-procrastinating behaviour that is an example of akrasia is poor diet adherence: I know that I will be healthier not eating this pint of ice-cream, but I do so nonetheless.
How about scheduling consistent time for work and then at the end of the day, logging whether the work session was 100% focus on the task or if there was any distraction.
Then you can see how many days in the month were focused, how much were distracted and if you care about it enough, you could set a goal that 95% of the sessions in a month should be distraction-free and keep working towards that.