govuk_template has an IIFE for header navigation toggle which adds functionality to elements that have a .js-header-toggle class attached to it.
The header component in govuk-frontend uses the same .js-header-toggle class (applied to a button element) to toggle the header.
Because the govuk_template script is expecting an anchor instead of a button, it tries to get the href attribute and fails to do so if the header component from govuk-frontend is used.

Prefix or change js- classes to avoid clashed with other scripts (including the deprecated ones).
I'm happy to raise a PR myself since I think I introduced this bit of code, but I need a decision at the team level on what the solution should be.
Adding this to the 3.0.0 milestone as a point of discussion, potentially we should be reviewing more than just this class and considering if they should be using a 'js-govuk' prefix.
We have decided to change our uses of 'js-' to be 'govuk-js-' as per @hannalaakso 's suggestion.
Should be fixed in v3.0.0. Closing this as #1444 has been merged.