I do not know the answer to your question, and the set of people that know off the top of their head is probably quite small (maybe 2-3 in the world).
A larger set of people could answer the question by digging into the implementation code, but that would be volunteering their time to you, perhaps hours.
So I think I have already mentioned before that if you make a TCP connection to a P4Runtime API server, including the open source implementations I am aware of, it uses gRPC, which I believe mandates the use of TLS, or at least strongly encourages it, perhaps with special options only intended for local testing that disable the TLS authentication of connecting clients. Being careful with secret keys is the typical way to prevent an untrusted client from connecting to the server.
I do not even know if it is possible for code running within the same user-space process as the P4Runtime API server can make "P4Runtime API" requests in that same process, or not. Certainly that process is capable of taking remote P4Runtime API requests and translating them into the necessary local API calls to access the local networking device, which would typically vary from one device to another, and I would think no one in their right mind security-wise would recommend executing untrusted code within the same user space process running the P4Runtime API server code.
Andy