The second warning is redundant and incorrect:
class Program
{
static void F(string? s)
{
int n = s.Length; // warning: 's' may be null
if (s.Length > 0) // warning: 's' may be null
{
}
}
}
(5,17): warning CS8602: Possible dereference of a null reference.
(6,13): warning CS8602: Possible dereference of a null reference.