I think you might be confusing the pm.DensityDist with pm.Potential:
The DensityDist is designed for situations where you want to “manually draw the PDF” of a prior distribution. It has nothing to do with the likelihood.
It sounds like you want to use a custom logp/custom likelihood which you can do using pm.Potential.
For that you can make the necessary computations with pure Aesara Ops if you want them to be differentiable, or you can implement a custom Aesara Op with or without a grad() implementation. Or you can use the as_op decorator like you’re doing already.
So try to replace the DensityDist with this:
pm.Potential("likelihood", logp("Dummy name", x0p, y0p))