there are several types of guava, so , it may be different for each type.
i know the Mexican types (smaller yellow) can ripen off the tree, but, i imagine there will be less flavor.
ive grown a few types, my fav is the large Asian white
i tried eating one once, that wasnt quite ripe.
it was not a good experience.
and i pulled a couple off the tree before a frost, to let them ripen inside.
they didnt... they just rotted.
i would let the ripen as much as possible before picking.
tried using bags ? or, even essential oils to spray them ?
i just bought some repellent, essential oils to mix with water.
mainly to keep leaf-miners and aphids off my citrus
but also to keep mosquitoes off my skin.
i am not suggesting the user and just used it 3-4 times since i got it...
it seems to work rather well, but you have to spray after every rain
and even every few days if dry.
https://www.ebay.com/itm/16oz-Insect-Repellent-Pure-Undiluted-Essential-Oil-Ants-Mosquito-Repellent/360226195120