The fern plugin for mapping to collapse or leave.
nmap <Plug>(fern-action-collapse-or-leave)
nmap <buffer><silent> h <Plug>(fern-action-collapse-or-leave)
You can set below variable to 1.
let g:fern#mapping#collapse_or_leave#disable_default_mappings = 1