Power will be drawn entirely from the Power Adapter as long as the iPad's overall CPU and charging power demand is less than the available output from the Power Adapter.
As such, if the Power Adapter output is less than demand, power will be drawn from both power sources. In simple terms, assuming that the iPad battery is fully charged, if the Power Adapter is capable of 12W - and the running load is 12W - the iPad battery will not discharge.
If instead the Power Adapter is capable of 10W, but the running load is 12W, the battery will supply the remaining 2W and slowly discharge.
When using the OEM Power Adapter supplied with an iPad, the Power Adapter is generally sufficiently rated to provide sufficient power for the iPad with maximum screen brightness and max’ CPU load - and still be able to charge the iPad battery at a reduced rate.
Unless your iPad Pro M4 was purchased within the UK or EU, it will very likely have been supplied with an Apple 20W USB-C Power Adapter - and this should provide sufficient power output to both run the iPad and simultaneously charge the iPad's battery.
If the iPad is connected to a USB-C hub and/or external USB accessories, these also require power to run. In some such circumstances, unless a USB-C Power Adapter with a greater power capacity is used, your iPad battery may be unable to simultaneously charge, or may slowly discharge to meet the shortfall in power demand.