Welcome to Scaler ! You will find this community useful, I hope.
I’m assuming what you are trying to do is to determine a chord progression to fit against the melody you have (Scaler doesn’t play melodies).
The root note won’t necessarily help determine the scale.
Scaler is essentially about chords, and that, I think, is the primary target of the detection. Figuring out a scale from a series of single notes is not always deterministic.
For example, you could have been playing B minor pentatonic, which only has a F# in, and your melody might not have had a flat second.
Or it could have been a Melodic Minor scale B Dorian b2, but you didn’t play a G# in the melody, but it has a flat 2nd and F#.
Could have been a Harmonic Minor mode, B Phrygian major (flat second and F#) but if your tune didn’t have the third in it, Scaler couldn’t distinguish between it and B Phrygian.
And or course if you were ‘playing outside’ fusion stuff or used a chromatic passing note somewhere, that would have influenced Scaler’s choice.
So the test is how the scales it came up with map against the notes you played.
Scaler is used to construct chord progressions. Having established a progression, however, any of the performances will create melodic lines over that progression. However, this is not relevant in your case, since you already have a melody (although you could use Scaler to generate a bass line or rhythm parts).
In your case, I’d set the scale to B Phrygian in section A, and then use the harmonised chords in section B to drag into section C against your melody by ear. This is normally fairly straightforward to do as first pass, as most melodies tend to use only 4 of the harmonised chords, and in any case, the flat 2 is easy to pick out.
You can then embellish those using the ‘suggest’ feature, or jazz it up by using 7ths, 9th etc in Section B, or altering the voicings.