@meowmeow I think your solution may potentially increase the height of the tree.
If keeping delete the right child of the root, the tree may become a list, which is O(n) height. The reason is the left subtree of root->right keeps growing in the worst case.
This solution is great for the test cases, but be more cautious in real interview.
Delete Node in a BST