"Why are commentards assuming the UK will leave the EPO"
It's about the UPC - not EPO. See https://www.unified-patent-court.org/.
"The UPC Agreement is open to accession by any Member State of the European Union. The Agreement is not open to states outside of the European Union"