Yes but if you get hit with an adverse costs order, that’s not your lawyer’s problem beyond them properly advising you beforehand that it’s a possibility if you lose.
Paying that liability is between you and the other side.