I wasn't sure whether this counts as a bug report or a feature request, so I'm putting it here to be safe. It's also possible this is out of scope, as the description for the back button feature specifically states (emphasis mine):
Pressing Mouse 4 (by default, rebindable) will try to find a Back/Done/Cancel button in your current GUI and click it.
However, I noticed that when viewing a recipe with EMI, JEI, or REI, and then viewing the recipe for one of its ingredients, pressing the back button exits the recipe viewer entirely[1], rather than returning to the previous recipe. I found this quite surprising and unintuitive at first. I also confirmed that if you bind the "previous recipe" button to Mouse 4, it behaves the same way, so it seems like Quark's behavior takes precedence.
I'm not 100% sure how doable this change would be for JEI specifically, as unlike the other two, it doesn't expose a keybind to view the previous recipe, so it's entirely possible that it doesn't keep track of recently viewed recipes at all. In any case, I think a change like this would be a decently large quality-of-life improvement if it does turn out to be doable.
[1]: Specifically, EMI and JEI return to the inventory screen, while REI exits the inventory entirely (which seems like a bug).