CBP stands for Customs and Border Protection. Proof of citizenship, as other answers have pointed out, resolves the issue of whether you should be allowed to enter. It does not resolve the issue of what customs duties you need to pay.
The last question on the first page of the US Customs Declaration and the back of the form require different answers from residents and non-residents. Residents declare everything they are bringing into the US. Non-residents only declare what they will leave in the US. On the other hand, residents get a $800 duty-free exemption, non-residents $100. Your choice of box for Question 15 tells them whether you are declaring as a resident or non-resident, so be careful where you put your answer.
Residence and citizenship are separate issues - I am a British, not US, citizen but fill in the declaration as a US resident, because I live in the US. I am not a UK resident, which affects issues such as access to the National Health Service.
In complicated, borderline cases such as digital nomads and people with multiple homes, determining residence can be quite complicated, and you can be resident in multiple countries and in different countries for different purposes. In simple cases, if you would unequivocally say "I live in country X", country X is your country of residence.
The customs issue is the simplest explanation of a CBP official questioning a US citizen about resident status on entry. Either you answered as a resident and the official thought you might not be a resident, or you answered as a non-resident and the official thought you might be a resident. Either way, they would ask questions related to your resident/non-resident status, such as how much of your time you spend in the US.
As long as you continue to live outside the US declare as a non-resident. If questioned by CBP about your non-resident status just answer the questions. It is a legitimate subject for them to ask about, and does not mean they are questioning your right to enter the US.