Thanks for the good question. First, a lot of whales actually eat fish rather than plankton. There's this old myth that big whales only eat plankton, but it isn't true. Right whales seem to eat mostly, perhaps, only plankton.
Blue whales eat mostly krill, which is technically plankton also.
Humpbacks, fin whales, minkes and others eat krill, but also lots of small fish such as herring, sand lance, capelin etc. If a right whale was feeding on plankton and a fish got into its mouth, it would probably swallow it. I don't know what would happen in a huge fish got into a whale's mouth, but it's probably unlikely that this would happen. I have, however, seen 'em eat seagulls from time to time - they don't mean to, but occasionally a gull swooping down for fish will get caught by the huge open mouth of a lunging whale. My 2nd grade students have a question.