The cash was taken from the agriculture budget to ease the cost-of-living crisis in Scotland.