This is a regression.
This does not affect UE5.
Creating a function with parameter type TEnumAsByte<MyEnum> will crash while compiling. In 4.26 and UE5 the code compiles without issue, and the user is able to access the enum.
5. Open MyDataAsset.cpp if it isn't already (Soulution Explorer: Source/<ProjectName>/Private)
6. In MyDataAsset.cpp below the '#include' add:
7. Press Ctrl+Shift+S to save all
8. Back in the Editor Press Compile in the Toolbar
The code compiles and the user is able to reference the Enum in blueprints by search MyDataAsset with Context Sensitive disabled.
Editor Crashes while compiling, and will crash on launch.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-138934 in the post.