In CoLab, press (CTRL + SHIFT + i) to open inspect window. Go to console tab then press source code below and press enter :
function ClickConnect(){
console.log("Working");
document
.querySelector('#top-toolbar > colab-connect-button')
.shadowRoot.querySelector('#connect')
.click()
}
setInterval(ClickConnect,60000)