I've been having trouble pin-pointing the source of the problem. I have found out, however, that this is probably NOT related to redstone at all. Please ignore attached world, and see instructions below.
1) Write and sign a book
2) Make 1 copy of the book
3) Read the copy of the book you made
4) Make 1 more copy of the original book
The copy of the book that you read and the copy of the book that you did not read do not stack if the actions are performed in this order. Once you've read both books, they stack once again.
You can check the attached world if you want an example of identical written books not stacking. I've left them in the crate in front of spawn.
Here is an attachment of a basic set up world in .rar form.
I can confirm that this is still occurring in 1.16.40. It has just affected my Realm.