There are several articles about this on the web, like this one:
And a quick way to check whether these settings work is to type
GTK_OVERLAY_SCROLLING=0 gramps
in terminal.
When I do that, the scroll bars are always visible when the viewport is smaller than the view itself, so that they don’t overlap anything else.