sage: type(gp(f))
yields
<class 'sage.interfaces.gp.GpElement'>
which isn't a Sage element. Unfortunately, to alert the user to this every time would be very noisy; it probably suffices to remind oneself that using maxima() or gp() or the like does not give one Sage elements, per se, and sometimes behavior will be different.
That doesn't mean we don't have inner inconsistencies, and likely some are in the list of open tickets William pointed to! We welcome work on them. Just that this particular thing isn't an example thereof.