I feel silly that I didn't see user9413's solution. Instead I proved
$$\forall\ell\in\mathbb{N}\,\forall X\in\mathcal{P}(P)[|X|=\ell\implies\sum_{d\,|\,i,\,d>0}\mu(d)f(d)=\prod_{p\in X}(1-f(p))],$$
where $P$ is the set of all primes and $i=\prod_{p\in X}p$, by strong induction on $\ell$. This works because for any $n\in\mathbb{N}\setminus\{1\}$ with prime factorization $n=p_1^{a_1}...p_m^{a_m}$, we have $\sum_{d\,|\,n,\,d>0}\mu(d)f(d)=\sum_{d\,|\,j,\,d>0}\mu(d)f(d)$, where $j=\prod_{p\in\{x\in P\,:\,x\,|\,n\}}p$. Anyways here it is - if there are any errors hopefully the powers that be in number theory here can elucidate. Enjoy!
The base case is when $\ell=1$, we have for any $X=\{p_1\}\in\mathcal{P}(P),$
$$\sum_{d\,|\,i,\,d>0}\mu(d)f(d)=\sum_{d\,|\,p_1,\,d>0}\mu(d)f(d)=\mu(1)f(1)+\mu(p_1)f(p_1)=1-f(p_1)=\prod_{p\in X}(1-f(p))$$as desired. Note we assume $f$ is not the zero function, and so $f(1)=1$.
The induction step is to take $k>1$ and assume for all $k>\ell>0$, $$\text{for any }X\in\mathcal{P}(P),\quad\text{ if $|X|=\ell$ }\quad\text{ then }\quad\sum_{d\,|\,i,\,d>0}\mu(d)f(d)=\prod_{p\in X}(1-f(p)).$$Then for $k$ in particular, and any $X\in\mathcal{P}(P)$ with $|X|=k,$ say $X=\{p_1,...,p_{k-1},p_k\}$, we have \begin{aligned}\sum_{d\,|\,p_1...p_{k-1}p_k,\,d>0}\mu(d)f(d)&=\sum_{d\,|\,p_1...p_{k-1},\,d>0}\mu(d)f(d)+\sum_{\text{$d\,|\,p_1...p_{k-1}p_k,\,d>0,$}\atop\text{
$p_k\,|\,d$}}\mu(d)f(d)\\&=\prod_{p\in X\setminus\{p_k\}}(1-f(p))-f(p_k)\cdot\sum_{d\,|\,p_1...p_{k-1},\,d>0}\mu(d)f(d)\\\\&=\prod_{p\in X\setminus\{p_k\}}(1-f(p))-f(p_k)\cdot\prod_{p\in X\setminus\{p_k\}}(1-f(p))\\&=(1-f(p_k))\cdot\prod_{p\in X\setminus\{p_k\}}(1-f(p))\\&=\prod_{p\in X}(1-f(p)),\end{aligned}where the second equality uses the multiplicative property of both $\mu$ and $f$ as well as the induction hypothesis. This completes the proof.