I suspect the bits on the sheet are lumps of gloop/ mould from the machine, rather than non-disolved tablets (though it may be that if you're over-filling your machine, as the tablets need to slosh around a lot to dissolve).
So, firstly clean your machine....get some HG Service Engineer (or similar), and follow instructions, IIRC, you put it in the drum, and run a boil wash. Check all the seals, and scrub them with bleach if necessary, wash the drawer and get rid of all gunky bits.
Then wash bedlinen at 60 degrees without over-filling machine. We put bottom sheet and pillow cases in one load, duvet cover in another load on its own.
I was told by a washing machine engineer always to use powder, rather than liquid or tablets (powder contains bleaching agents, which help keep machine clean). add a scoop of Oxi-Clean or Vanish as well.
If at all feasible, hang outside to dry; UV light will help bleach sheets, too.
Oh, I second the "nothing that isn't completely white in the machine at the same time "rule.
You could try putting a colour catcher in the wash too, even though there isn't any colour in there, apparently they can absorb dirt.
Good luck!