why not just copy the code from the dependency into your own sources?
It usually just boils down to keeping a copy of the version of a dependency you used.
This is actually one of the most common causes for GPL violations. And companies have gotten into serious trouble for that.
Either rewrite the code, or maintain it as a dependency and follow the licensing rules. Don't simply copy code from it into your project unless you have explicit reason to believe that that is OK to do.