For years now macbooks suffered a strange weird bug - if your battery is below 80% and you connect them to an external monitor only, it will charge, but every 1% of battery increase the display would disconnect for a moment and then reconnect. One example report - https://www.reddit.com/r/MacOS/comments/1147dpq/macbook_pro_disconnecting_from_usbc_display/
Previously the only solution was to also plug in with the dedicated magsafe charger.
I just noticed today that this is finally fixed in Tahoe! I just plugged my macbook at 50% battery to my monitor and only noticed that when it was already fully charged, that I had been using it without any flickering the entire time! About time apple!