" Love from the Male Lead " and " General, Be Kind " are both ancient romance novels, but the one that fits your description is " Love from the Male Lead ". The male protagonist was not good to the female protagonist in the beginning. After the female protagonist left, the male protagonist realized that he loved the female protagonist deeply, so he began to make great efforts to redeem himself. The plot of this novel also included the female protagonist transmigrating into the novel and becoming the villain, while the male protagonist was the target of the villain's female supporting character. I hope you like my recommendation.