The patch button does nothing magical, it just swaps the osbot executeable with the runelite one, it does not matter when you patch it.
It just moves osbot to the runelite executable and reversed when you unpatch
but anyway, no idea what your issue is, the error just says that there is no connection possible for some reason