The Queen's horse Dartmouth won the Yorkshire Cup on the final day of the Dante Festival at York, as trainer Hughie Morrison was inadvertently caught up in more controversy.
Dartmouth, trained by Sir Michael Stoute, beat Simple Verse by a neck.
Morrison was later called before a stewards' inquiry after an employee of his was alleged to have urinated in the stable of his horse Marmelo.
The employee was subsequently found guilty of improper conduct.
Morrison was instructed by the British Horseracing Authority (BHA) to "ensure all of his employees are correctly briefed as to the integrity implications of these actions in the future".
He said: "There's nothing to it really. The lad is a long-standing employee. He knows he's made a mistake and he won't do it again."
Marmelo, who was fifth in the Yorkshire Cup, was ordered to have a routine doping test.
Urinating in a racecourse stable is banned because of the risk of cross contamination.
BBC horse racing correspondent Cornelius Lysaght said: "The chances of cross contamination are probably rather higher than 100-1, but of course it's possible, and this is an example, the BHA will say, of how all regulations relating to security and integrity on the racecourse are tightly enforced."
On Thursday, Morrison offered a reward of £10,000 to clear his name after one of his horses tested positive for an anabolic steroid.
Our Little Sister tested positive for nandrolone after finishing last in a race at Wolverhampton on 14 January, which had prize money of £2,500.
Royal runner takes the prize
Dartmouth, the 11-4 favourite, was one of five horses in the running over the final furlong of Friday's race.
Having made his challenge on the stands-side rail, he snatched the verdict from Ralph Beckett's 2015 St Leger winner Simple Verse (13-2).
The pace-setting High Jinx, having his first race for 747 days, kept on in gritty fashion and was just a neck away to claim third on his first start for Yorkshire trainer Tim Easterby.
Winning rider Ryan Moore said: "He felt very easy the whole way, he's got mile-and-a-half pace, he was just doing a little too much in stages.
"He travelled beautifully and is such an honest horse, but it didn't help that I was apart from them and he's done very well."
'Dartmouth has the wind in his sails'
BBC horse racing correspondent Cornelius Lysaght:
You don't have to be an arch-Royalist to enjoy the spectacle of the Queen beaming at a success for one of her runners at Royal Ascot.
And, after this narrow defeat of his nearest three rivals, Dartmouth - named after the Devon naval town - goes to the famous fixture in June with the wind in his sails.
It would be nice to think Dartmouth might try to emulate his owner's horse Estimate, who won Ascot's marathon Gold Cup four years ago, but he'll be sticking to the shorter Hardwicke Stakes this time.