It probably depends on the compound and the solvents in question.
some compounds have been shown to interconvert in solution. Here is a reference to thalidomide interconverting in solution: https://webspace.yale.edu/chem125/125/thalidomide/thalidomide.html
Consider evaporation at a lower temperature or freeze drying if it is in an aqueous solution.