Is there a way to disable ReCaptcha if a WordPress user is logged in?

The title is self-explanatory. I’m looking for a programmatic way to disable Google ReCaptcha in Gravity Forms is a WordPress user is logged in.

Are you using reCAPTCHA v2 via the built-in Captcha field or v3 via the reCAPTCHA add-on?

Ideally I’d like to figure out ways for both, as I’ve got projects using both.