I am not famiiar with lancache at all, but a while ago, another user had difficulties using a dockered lancache as Pi-hole's upstream DNS. This was caused by lancache handling DNS UDP traffic only, instead of UDP and TCP.
Maybe that is affecting you as well, see Intermittent 'config error is REFUSED'.