Conservative Supreme Court justice thanks Texas Republican for ‘standing up’ for him after he was ‘under attack’