Isn it confusing that some rafsi are identical to cmavo?
No, it isn’t. In theory you can tell completely from the neighboring syllables whether something is a cmavo or a rafsi. This is how the computer is able to parse Lojban without understanding its meaning. For example the dei in bavlamdei (“tomorrow”) is a rafsi for “day,” not the cmavo dei, a special pronoun meaning “this sentence.” We know which is which because Lojban words can’t end in a consonant, so dei must be a part of bavlamdei; “bavLAM” can’t be a whole word. (No, it can’t be a name, either. Names end with a consonant followed by a pause, written as a “.”) In practice you can also use your knowledge of the meanings of the words to help with this; it is possible to think up a sentence like la bavLAM. dei cusku, “Bavlam says this sentence.”, but it is not likely in practice if you don’t know anyone named “Bavlam”!