Code Review only allows for reviews of code that is written/maintained by the author. We have that requirement for multiple reasons, including legal (copyright) and moral (to avoid code-shaming).
When a question asks to compare the poster's solution against some arbitrary solution found on GitHub, that is a underhanded way to ask for a review of third-party code. There is no reasonable way to say "your code is better" without implying that the third-party code is worse, and therefore it is not a fair question to ask on Code Review in the first place. Such underhanded "code review" requests should be closed based on authorship grounds, and could be made on-topic by removing all references to the third-party code.
There are circumstances where a poster asks to compare their solution against one provided by the book where the challenge was posed. That's OK, in my opinion. The book's author presumably acts as an authority, and it's OK for us to challenge that authority as part of the learning process.