If 6pm and no knowledge was ok, almost 9pm with streetlights still off is too.
So yeah, your gauge of what 9pm means might not be accurate for the situation! I doubt you were imagining 9pm being bright and an hour or two before its too dark for a young person to be out riding a bike, but that could well be the case
Then she realized we can now call her and tell her to come home when she's out.
"I'll leave the phone at home, daddy, I'm afraid I'll break it while playing."
“Bye, have fun, come in when the street lights come on” is entirely appropriate for a 9-year-old when school’s not in session. It’s playing outside, not playing fortnight or drooling to the YouTube algo. It’s ok for that to run a little late in the summer.
For fucks sake, she's 9 years old, let a kid be a kid and not a productivity machine, she will have her whole life to worry about that later... At that age the worse that can happen academically speaking is taking a bit longer to learn how to multiply and divide numbers.
At that age is easy to pick up bad habits and also easy to let them go, OP seems to be a good enough parent to nudge their kid into better habits if they deem necessary.
(Not actually 'bad', but trendsetters that helped some of the other kinds come out to play more.)
Do you home school? Because if you don't home school, surprise! "Bad" kids are everywhere, including in any school that exists.
The best you can do is talk about bad influence. Peer pressure. Tailoring that conversation to the child's personality.
My thoughts on this are, the time to teach self-control and responsibility is when young. It won't take completely when young, as the brain is literally not fully developed in that capacity yet, but the lessons can stick, and be known when older.
Those lessons are action->consequence outcomes, and in a sense, borking up responsibility at times becomes a leaning moment. Put another way, mistakes are how we learn, and small mistakes when young, are better than massive mistakes when 20.
Yes, bad habits are a worry. I don't think there is any simple answer here, except independence is important for any adult mind, and that flows from independence in youth.
And of course, this all depends upon the child too. Some have more sense at 5, than others at 50.