JK Rowling received an £18 million payout from her publishing company last year amid the fallout from her transgender rows.