Size modulated transition in the fluid–structure interaction losses in nanomechanical beam resonators