USB communication between Android phone and MCU while continuously charging the phone
If you want your MCU communicating with your android phone, the most common approach will be to use the MCU in a Device mode. Otherwise your phone (as a Device connected to a Host – a PC or MCU) will typically act as a storage device or a camera, you choose it on your phone when it is attached to a Host.
MCU's Device mode, on the other hand, is the same as connecting your MCU to a computer (via virtual COM-port over USB) like arduino does. You can communicate with your phone the same way, if the phone has USB OTG support. Which most of modern android phones does (check the phone specifications). If it doesn't, consider using bluetooth.
If it does, all you need is a simple OTG Y cable like this one (except a USB-C version):

Here is a video example.
It does exactly what you need: charging your phone while phone is communicating with an external USB device.
It's also a good idea to make sure your phone (even if it does support USB OTG) is working with your MCU correctly – OS version, driver compatibility, etc. A dev board is handy for prototyping. You can test it with an Android app like Serial USB Terminal.
In any case, if you want to permanently attach your phone to a charger for a long period of time (to act as a touch screen of sort), you should consider powering your phone directly with [3.3V - 4.2V] from a filtered and stabilised buck converter or even a linear regulator, thus replacing the battery away. Because a lithium cell will degrade in this mode fast. About 3 to 12 month, depending on its quality (if new).
Degraded lithium battery (esp. left unattended) could swell, overheat, explode, damage your phone and even cause fire.