Haven't tested this
Go to
https://twitter.com/*your username*/following
Right click, Inspect
Go to console
Paste this:
Array.from(document.querySelectorAll('[role="button"]')).filter(node => node.textContent == 'Following').map(btn => {
btn.click();
setTimeout(() => {
document.querySelector('[data-testid="confirmationSheetConfirm"]').click()
}, 500);
})