I don't think that GFCI buttons are used as switches. So I don't think it is a code violation.

On the otherhand one does need to reset them. So good practice would be to place them with good access.