There seems to be a contradiction between the second half of Article 39 of the Lawyers Law and Article 33 of the Criminal Procedure Law.
Defenders and agents are different. The former mainly refers to defending the defendant of a criminal offence, while the latter is an agency action in civil cases. The second half of article 39 means that if the client he represents has an interest relationship with himself (lawyer) or his (lawyer's) close relatives, it will be unfavorable to the client, which is related to his professional ethics requirements. Because lawyers must be responsible to their clients when they represent civil cases. In criminal defense, there are great differences.