I found a way. This approach solved my problem but I think there should be a better way. I'm posting this in case anyone is interested. What I did was before calling setComposingText, first, I called setSelection. By doing this I'm selecting all the text in my input then I'm setting the composing text.
InputConnection conn = getCurrentInputConnection();
if (conn != null) {
int ccLength = composingContent.length();
if (ccLength > 1) {
composingContent.delete(ccLength - 1, ccLength);
conn.setSelection(0, ccLength);
conn.setComposingText(composingContent, 1);
}
}