We saw this very clearly in Oracle v Google. Judge Alsup told the jury that APIs were copyrightable and the jury found that Google infringed there. This is despite the fact that at least some jurors were uneasy about that conclusion (see, among other things, the deadlock over fair use). Judge Alsup later decided that APIs weren't copyrightable, so that portion of the jury's verdict turned out to be unimportant, but that's separate from the job the jury was asked to do. If the jury had found that Google didn't infringe because they decided APIs weren't copyrightable, that might have been the right bottom-line result, but they still wouldn't have been doing their job.
In civil cases the jury can ignore the judges instructions but if the judge feels that in doing so they've rendered an unreasonable verdict, he or she can issue a judgement notwithstanding verdict which essentially amends or entirely over rules the jury's decision.
https://en.wikipedia.org/wiki/Judgment_notwithstanding_verdi...