I have a data set of 771 sample size. But some of the variables (laboratory findings like ALT, AST, creatinie level) have more than 50% missing values. Should I drop those? But I think those variables are important.
Yes, it's disappointing when you can't collect all data points.
However, for your specific query, the answer depends on how important to your research question(s) those variables (with high levels of missing data) happen to be. If the variables are not important to your RQs, or if suitable proxy variables exist (and the associated data points are available), then drop them from your study.
If important, then you can keep them (and either rely on just using full-data cases only, which would be a problem if missingness is not ignorable, which would be the case if missingness was related to the level/value of other variable/s in the data set), try harder to collect all the data points (which could be logistically challenging), or attempt some sort of imputation (which, with over 50% missing values would be a pretty risky proposition for any variable).