Getting "C++ Default parameter not parsed" error when using a constant as a function default

I have code like this:

UCLASS()
class UMyClass : public UGameInstanceSubsystem
{
	GENERATED_BODY()

public:
	static const int MyConstant = 5000;
	
	UFUNCTION(BlueprintCallable)
	void DrawText(UPARAM(ref) const FString& InValue, UPARAM(ref) const FString& InId, int InDurationMs = MyConstant);
}

And I get the following error:

 error : C++ Default parameter not parsed: InDurationMs "MyConstant"

I want to use a compile-time constant to specify an optional parameter, but anything besides a literal magic number gives me this error. I’ve tried the static constant above, I’ve tried a #define, and I’ve tried changing the parameter/constant type from int to int32. My thought is that there might be something in the UFUNCTION declaration that I’m missing.

Is there a proper way to add named constants as defaults in Unreal C++?