It's fine to disconnect, or you can leave it connected. In fact, you have 3 choices:
- If you have a need to remove the CO2 tank now, you can do that, and connect up again 5 days before you need the beer.
- Alternatively, leave the CO2 connected now for 5 days to fully carbonate the beer and then disconnect. The beer will stay carbonated and will be ready when you need it. (During serving, it's a good idea to keep the CO2 connected if much of the keg will be consumed, so the dispensing pressure is maintained.)
- Finally, you could simply leave the CO2 tank connected until the keg is empty.
If you are sure that you have no leaks, then option #3 is the simplest and least trouble-free. Should you need to disconnect the CO2 tank for some reason, then #2 is preferable over #1, simply because the beer will then be fully carbonated. With #1, the beer may only be partially carbonated - if there's little CO2 in the beer, it's possible the pressure in the headspace can drop below what's needed to maintain the lid seal on the keg when the CO2 in the headspace dissolves into the beer.
So, yes, it's fine to disconnect the co2, just be mindful of when you need to reconnect to have it ready for serving.