How to change OutlineSettings CornerRadii in C++

I don’t know if its relevant or not, but if someone needs it in the future:

TObjectPtr<UButton> ButtonWidget;
FButtonStyle& NewButtonStyle = ButtonWidget->WidgetStyle;
NewButtonStyle.Normal.DrawAs = ESlateBrushDrawType::RoundedBox;
NewButtonStyle.Normal.OutlineSettings.CornerRadii = FVector4(0,0,0,0);

ButtonWidget->SetStyle(NewButtonStyle);

When directly accesing the ButtonWidget->WidgetStyle property I get a warning telling me that direct access to WidgetStyle is deprecated, and so I should use get() set().
But there was just no way I could get this work without the direct access.