macbook pro 2017 battery drains even in charge
If your MacBook Pro is discharging while in use and plugged in, you are probably using the wrong charger.  The 2017 MacBook Pro uses either a 61W or 87W charger.  See:  Find the right power adapter and cable for your Mac notebook

When selecting a charger, always go equal or bigger than what you need.  The wattage rating is the maximum that will will supply, not "push".  In other words, if your device needs less, it won't harm it.  However, if it needs more, there won't be any more to give.