UE 5.1 Set Is Focusable - blueprint

The solution is in the thread @RSBagirasys posted, and also in the comment @Vinicius_Pires left.
The SetIsFocusable function is part of a CommonButton, not part of a normal button. The CommonButton is part of the CommonUI plugin.

The CommonUI plugin comes packaged with the editor, so all you need to do is enable it.