How to deal with the problem "the optimal value obtained by CVX is not optimal"

Recently, I deal with an integer optimization problem. By relaxing the integer variable x into a continuous variable r, I can rewrite the optimization problem as a convex one. However, I have such a problem. The optimal value obtained by CVX is not “optimal” than I directly set x as one. I think it is caused by the low accuracy of CVX. Anybody can help me solve this problem? Thanks very much~