I have used both for clarifying beer. I prefer gelatin as its cheap and quite honestly I think its more effective when used properly. Proper use is detailed in this link. https://blog.kegoutlet.com/how-to-use-gelatin-to-clarify-your-beer/
I have to say when I started out using gelatin I did it wrong and it did not appear to be as effective. I also went a little hog wild on its use and used on an imperial stout. I shined a spot light through the dark beer but darned if I could see much of a difference and could not taste a difference from previous imperial stout. As others have said you use it on styles calling for a clear beer. For example, I use it on Kolsch and tripel. I recall seeing an experiment done on gelatin for an IPA and if I recall there was some differences in flavor detected, but no clear preference of one over the other. I believe the author of experiment had a slight preference for not using gelatin. Hope my memory is correct.
I personally would not use either clarifying agent on an oatmeal stout as it is a dark beer. This is based on my experience with the impact on the imperial stout which granted is an extrapolation to oatmeal stout.
While you did not ask, never use gelatin to clarify a white wine. It strips flavor out of it....based on a masters thesis work done on white wine clarification.