Raducanu took a “bodily and psychological” break after reaching the Miami Open quarter-finals final month and the opening spherical in Madrid on Wednesday was her first aggressive match since.
It additionally marked a primary win on the outside clay in virtually three years.
However on Friday, competing in simply her 18th aggressive clay-court match, the previous US Open champion needed to claw her approach again from a break down for 3-3 within the first set earlier than instantly dropping her serve once more after two double faults for Kostyuk to take the opener.
Raducanu, who continues to work with coach Mark Petchey on an off-the-cuff foundation, improved within the second set, profitable 4 video games in a row on her method to forcing a deciding set.
However a poor opening sport from the Briton set Kostyuk as much as race to victory and guide her place within the third spherical, the place she is going to meet Veronika Kudermetova.
In the meantime, prime seed Aryna Sabalenka comfortably beat Anna Blinkova 6-3 6-4 however eighth seed Zheng Qinwen struggled in a 6-4 6-4 defeat by Anastasia Potapova.
Spain’s Paula Badosa has withdrawn from the event with a again harm.
The world quantity 9 had been resulting from tackle Veronika Kudermetova within the second spherical.