How to prevent people from seeing that you are cross eyed?

Surgery. Crossed eyes are difficult to mask without dark glasses or surgical correction. Those with mildly crossed eyes can wear glasses that have prisms to force the crossed eye to look straight. Moderate to severe crossing requires surgical correction in youth; in adults with longstanding crossed eyes, surgery can be performed to improve the cosmetic appearance.
Treat the cross-eye. Unfortunately, it's very difficult to mask a cross eyed individual or state. If glasses help your eyes not cross so much, then these should be worn, but otherwise, the only way to prevent this appearance is surgery.