That's true, the end of the show and books should be similar (the same?).
Individual characters fate is likely to vary from show to book.
Since she couldn't know it was a boy until he was born, it makes sense she would choose the name Rhaegar had chosen for his firstborn son.
From the writers perspective, it could just be a nod to the books to use that name instead of looking for another name.
I was too vague in what I was saying, but you're right. I left myself open to that.