a CO detector will not "go off" (did you mean alert?; going off would be a bad thing) for gasoline vapors...
Gasoline leaks are not going to set off a CO detector. Gasoline Vapors are not going to cause an "injury" either from exposure. Most of us here on the journal would be dead if they did. Sounds like you had an anxiety attack or something that was triggered by the smells due to a sensitivity.
Skipping semantics here, CO detectors are ALL capable of detecting combustible vapors, and that includes gasoline. That's because CO itself is a combustible gas. They usually do a pretty good job of discriminating CO from other combustible gases and should alert with a T4 alarm (4 beeps and possibly a spoken word warning of CO) only when detecting carbon monoxide, but may have another set of beep codes for other combustible gases. I've personally seen a CO detector beep an error code when someone left a natural gas stove burner leaking, and on another occasion I've set off the combustible gas alarm feature of a combination CO/gas detector by using too much silicone spray lube (the carrier is hexane) in too short a time.
When you sought medical attention, did the provider tell you what you were exposed to? It’s a simple blood test to see if it was C0.
Around here, the fire department will use a special pulse oximeter to see if you've been exposed to CO. No blood draw is required, and I'd expect every hospital to have at least one of these devices for such situations. But as was explained, this was not CO, since it was a fuel leak from a non-running engine.
While long-term exposure to gasoline fumes MAY be harmful, it isn't going to kill you in your sleep like CO. Which means that the symptoms experienced can be determined to be from hysteria. I don't want to down-play any very real symptoms, and no, you shouldn't be getting garage fumes into a bedroom, but what happened was not life threatening.
That being said, you do really want to minimize any airflow between a garage and a bedroom, because if vapors get through, CO can as well. And your choice of buying a combination CO/combustible-gas detector for the bedroom was very wise.
If it were me, I'd buy a roll of
aluminum tape and seal up the holes in that box. Technically, the holes are there to allow electronics inside to not overheat, but there's nothing currently in there drawing power. And I'd also seek out any other gaps in that wall you can find and plug them with caulk (rope caulk should be fine for a renter to use).