A liberal criminal defense attorney once told me that, if you read the Constitution properly, there is an absolute right to bail. Nothing about "danger to the community" or "likely to flee." Those exceptions to the "right to bail" were invented by the courts.
And state legislatures.
Most courts just make an extremely high bond.
In Kyle Rittenhouse's case, it was two million dollars! (for someone who had strong ties to the community, no criminal record, a plausible claim of self defense, and who had turned himself in a few hours later, after attempting to do so minutes after the incident.