Back about a year or so ago, China started to tightened visa grants in Hong Kong. An applicant is supposed to get the visa from his/her country of origin or residency unless there is a reason. In case of HK, the HKID will show the residency.
However. if the applicant holds a permanent HK ID with Chinese nationality, he/she is supposed to enter China on Hui Xiang Zheng. It is analogous to that a US citizen must have only US citizenship on US soil. In fact, Chinese interpretation is more relaxed in that a Chinese citizen from a SAR entering China on a foreign passport will not lose his/her Chinese citizenship.