My advice is to keep in mind that sunk cost is a fallacy. That can hurt, and itβs so much easier to say than to do, but you can also look at where all your experiences have taken you and still value that. Maybe write up a list of skills/experiences youβve acquired on this track that you can apply elsewhere for CV purposes.
Another idea is maybe all you need is a break to defeat some burnout. Maybe stepping away for a little while will refresh your interest in what you wanted to do before.