For the record, when I use writer.add_scalars() like this:
writer.add_scalars('loss/train', {f'fold{i_fold}': train_loss}, epoch)

I get a result like this:
image1068×730 45.6 KB
Which gives the desired effect but makes extra run objects as you can see in the bottom left.