Check in Systemsettings > Application Style > Window Decorations
there should be an option to set borders.
or edit the following config file: ~/.config/kwinrc
look for the line: BorderlessMaximizedWindows=true
and either change it to false or comment it out.