I’ve actually just managed to fix it in python script by using “set_editor_property” instead of setting compression_settings parameter:
# DOESN'T WORK - https://forums.unrealengine.com/t/set-compression-texture-settings-from-blueprint-not-working/426562/3
# tex.compression_settings = unreal.TextureCompressionSettings.TC_HDR
tex.lod_group = unreal.TextureGroup.TEXTUREGROUP_16_BIT_DATA
tex.set_editor_property('compression_settings', unreal.TextureCompressionSettings.TC_HDR)
tex.set_editor_property('lod_group', unreal.TextureGroup.TEXTUREGROUP_16_BIT_DATA)
You can also do it with “Set editor property” node from blueprint.
If you don’t know how to make this “set” node with texture compressions settings - it’s a bit tomfoolery but it works: