Shared landscapes in which humans and wildlife coexist, are increasingly recognized as integral to conservation. Fine‐scale data on the distribution and density of threatened wildlife are therefore critical to promote long‐term coexistence. Yet, the spatial complexity of habitat, anthropic threats and animal behaviour in shared landscapes challenges conventional survey techniques. For social wildlife in particular, the size of sub‐groups or clusters is likely to both vary in space and influence detectability, biasing density estimation and spatial prediction. Using the R package ‘inlabru', we develop a full‐likelihood joint log‐Gaussian Cox process to simultaneously perform spatial distance sampling and model a spatially varying cluster size distribution, which we condition upon detection probability to mitigate cluster‐size detection bias. We accommodate spatial dependencies by incorporating a non‐stationary Gaussian Markov random field, enabling the explicit inclusion of geographical barriers to wildlife dispersal. We demonstrate this model using 136 georeferenced detections of Campbell's monkey Cercopithecus campbelli clusters, collected with 398.56 km of line transects across a shared agroforest landscape mosaic (1067 km2) in Guinea‐Bissau. We assess a suite of anthropogenic and environmental spatial covariates, finding that normalized difference vegetation index (NDVI) and proximity to mangroves are both powerful spatial predictors of density. We captured strong spatial variation in cluster size, likely driven by fission–fusion in response to the complex distribution of resources and risk in the landscape. If left unaccounted for under existing approaches, such variation may bias density surface estimation. We estimate a population of 10 301 (95% CI [7606–14 104]) individuals and produce a fine‐scale predictive density map, revealing the importance of mangrove‐habitat interfaces for the conservation of this heavily hunted primate. This work demonstrates a powerful, widely applicable approach for monitoring socially flexible wildlife and informing evidence‐based conservation in complex, heterogeneous landscapes moving forward.