In this event only the pilot in command can log time as P1.
One of the requirements to hold a BGA motor glider instructor's rating is to have a valid JAA PPL with a TMG rating or an NPPL SLMG licence. Which means that you & the instructor would both hold similar power licences, but only one of you can be PIC.
As it's a lesson given by a club instructor in a club aircraft, it's not unreasonable for the instructor to assume PIC responsibilities & privileges.