Roy Bhaskar [1] is credited with developing a version of Critical Realism [2] with applications in the social sciences.
What is the meaning of Roy Bhaskar's notion of epistemic fallacy (as distinct from [3]), briefly described in:
https://warwick.ac.uk/fac/soc/ces/research/current/socialtheory/maps/criticalrealism/
... where, according to Roy Bhaskar's thinking, it is stated that:
"The scientist's understanding is through epistemological constructivism and relativism. This is where the phrase Critical Realism originates from- the 'epistemic fallacy' that is reducing what we say is 'real' or exists (ontological statements) to what we can know or understand about the 'real' (epistemological statements). The real are the unobservable mechanisms that cause events. Epistemology and ontology are separate." [my bold]
While epistemology and ontology can be described as separate, I'm not convinced that they are separate: i.e. that what we can consider as real is necessarily independent of, or uninfluenced by, the ways we obtain knowledge of what it real. (I'm not a philosopher, but an interested physical/theoretical chemist.)
Thoughts on the question, from those more qualified. will be appreciated.
[1] https://en.wikipedia.org/wiki/Roy_Bhaskar [2] https://en.wikipedia.org/wiki/Critical_realism_(philosophy_of_the_social_sciences) [3] ...as distinct from the https://en.wikipedia.org/wiki/Masked-man_fallacy