I highly recommend you stop riding until after the surgery. Every time you blow your knee out you're putting yourself at a much higher risk for more problems down the line, including but not limited to tearing your meniscus as well.
I've now torn both ACLs in my knees. My right one back in 2009, left one in 2019. The recovery and rehab sucks ass, but take it seriously and do everything they instruct you to. You'll get to a point around the 4 month mark where you think your knee feels great and want to resume riding, but your ACL graft will actually be at its weakest at this time. Your doctor can explain this better than I can, but basically when they harvest your new ACL either from your patella, hamstring, quad, or cadaver, and graft it into your body, it slowly dies then is reborn as your new ACL. There's a lot more technical terms to it but that's the gist of it. 6 months is the bare minimum for the graft to fully solidify as the new ACL, but some doctors recommend up to a year or even a year & a half. Mine recommended 6 months each time. Whatever they say, do it, because if you don't listen and start riding at the 4 month mark, you're gonna risk tearing it again then those 4 months are a waste anyway + you're back to square one.
ACL wise, mine are fine. I got unlucky with my left one though and ended up with imbalanced muscles around my kneecap, causing a tracking issue which causes pain when doing certain things which I'm still dealing with working through. Supposedly, something like that can happen with ACL surgeries, but not all the time. My right knee never had that issue, I just got unlucky this time around and after I was cleared to ride again all this covid shit happened causing me to put off seeing a doctor, which is why it's still persisting. Had I done something sooner it'd probably be back to 100% by now. Gonna give it another week or so and if there's no more improvement I'm gonna see a doctor again, but like I said the ACL portion is fine, and my other ACL from almost 12 years ago is still fine... So as long as you do as your doctor & physical therapists say, you'll be fine as well.
Also, when I say no riding before the 6 month mark... I mean no tricks. Riding a bike is actually good therapy for the knee, so once you're cleared to pedal a bike again it's okay to ride around as it strengthens & helps increase range of motion. Just be very cautious as to not fall or have to put that leg down. I personally got a road bike to pedal around on till I felt comfortable enough to get back on the bmx to pedal around on, so maybe look into that and you can at least pedal around with your friends or get out and enjoy the weather. Another thing to note is that your new graft, while still healing, is stronger than you think... There's gonna be many times your knee will pop or something (popping is 100% normal) and you'll think you retore it already before the 6 month mark, but it's just scar tissue breaking up. Obviously that doesn't mean it won't tear if you wreck/bail and land on that leg, it just means when doing rehab/walking, it's just not as likely to tear as you might think but definitely still be cautious.