Those are just some ideas off of the top of my head. It's still worth doing but I'd consider it a separate task from learning the fretboard. If practiced well, instead of teaching you where each note is, it should eventually make the direct mental connection between what you see on the staff to where your finger goes. A method book should introduce the notes of each position gradually and connect them to the notation. As r lo said in their answer, a method book may help but in a slightly different way.Again, always say and play and think about the notes that you're playing. Play the chord and then the associated arpeggio or scale to connect them mentally. Play arpeggios in different orders, starting from different notes, and in different inversions. Again "say and play" and mix it up as many ways as you can. Get into scales, arpeggios, and chords including inversions if you haven't already.This will come in handy later musically if you want to voice-lead through chord inversions. And don't neglect the middle strings just because I said "chord roots".
The fingering might be weird and it might not be something you'll do much in actual music, but the point is that it goes against what muscle memory you had playing across all strings in a position. Play those same melodies or anything else like scales on a single string.Challenge yourself to play it in as many place across the neck as you can. Play some simple melodies or licks and then move them to different positions.But don't give up, come back to it and try again. If you tried this and didn't work well, try something else. But don't settle for just tapping the note name on a screen. Flash cards or similar random quizzes.And if you go a step further and sing, you'll train your ear a little more along the way.
You could just think it, I guess, because the point of saying it is only to make sure you're thinking about it. Saying the note name or whatever you're learning helps connect your muscle memory, your mind (the abstract theory like note names or scale degrees), and your ear (the pitch) all at the same time. Always say (or sing if possible) the notes as you're playing exercises like this or scales or whatever.To start with find some methods and exercises to work with. In a sentence, mix it up and steer away from where you're comfortable.