Three words, one spelling pattern, three different sounds: dose ends in a hissed /oʊs/, rose in a buzzed /oʊz/, and whose in /uːz/. The -OSE ending is a small puzzle, but the pieces sort into clear groups.
The Rule
Group 1: /oʊz/ (voiced "z"). This is the default for most -OSE words, especially verbs: rose, nose, pose, those, chose, prose, hose, expose, suppose, compose, propose, arose.
Group 2: /oʊs/ (voiceless "s"). A set of nouns and adjectives keep the hiss: dose, morose, verbose, grandiose, comatose, bellicose, and the adjective close ("near").
Group 3: /uːz/. Two very common words break the vowel: whose and lose both say /uːz/.
The star example is close. As a verb ("to shut") it is /kloʊz/ with a buzz; as an adjective ("near, nearby") it is /kloʊs/ with a hiss. The voicing tells the listener which word you mean.
Practice Words
Do Not Mix These Up
Keep lose and loose apart: lose (-OSE) is /luːz/ with a buzz, while loose (-OOSE) is /luːs/ with a hiss. Likewise whose /huːz/ versus choose /tʃuːz/ (spelled -OOSE) but same buzz. When a word is clearly a verb ending in -OSE, your safest guess is the voiced /oʊz/; the hissed /oʊs/ group is short and worth memorizing.
Quick Tip
Feel your throat. Put a hand on your neck and say rose: you should feel a buzz for the /z/. Now say dose: no buzz, just air for the /s/. That vibration test instantly tells the two -OSE groups apart.