That’s not plagiarism. Plagiarism is is passing off someone else’s work as your own.
The bounds or plagiarism have no ties to the legal bounds of what is or isn’t copyright infringement. You can have either one without the other, or both at the same time.