MacBook Pro not charging under heavy load
This behaviour is perfectly normal.

On all of Apple's Intel-based laptops, the battery-pack is the power source 100% of the time, even when connected to a charging supply. The battery-pack is comprised of two circuits of cells, each circuit is capable of providing the maximum current demand of the laptop whilst the other circuit gets a recharge, with the two circuits changing roles every few minutes.

Whilst your MacBook Pro shipped with an 87W charger, the actual maximum draw of the computer itself is 121W - display on, WiFi/BT enabled and communicating, CPU &amp; GPU both at full workload. Under that level of power use, the battery is having more power go out than what is coming in, so you will lose charge under maximum load even when connected to a charge source, albeit at a slower rate than if it were running on battery alone.