Here is a suggestion based on the code linked in the question:
\documentclass
%[parskip=half]
{scrreprt}
\usepackage{lipsum}% only for dummy text
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{etoolbox}
\colorlet{feline}{darkgray}% change the color of chapter numbers here
\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\setlength{\fboxsep}{0pt}%
\colorbox{white}{\color{feline}\usefont{U}{eur}{m}{n}\thechapter}}}% change the font of chapter numbers here
\raisebox{\depth}{\usebox{\feline@chapter}}%
}
\renewcommand*{\chapterformat}{%
\sbox\feline@chapter{\feline@chapter@marker[1.61cm]}% adjust the height of chapter numbers here
\makebox[0pt][l]{%
\makebox[\textwidth][r]{%
\usebox\feline@chapter}}%
}
\renewcommand\chapterlinesformat[3]{%
\Ifstr{#1}{chapter}
{#2\parbox[b]{\dimexpr\textwidth-\wd\feline@chapter-1em\relax}{\raggedchapter #3}}
{@hangfrom{#2}{#3}}%
}
\makeatother
\preto\chapterheadendvskip{%
\vspace*{-\parskip}%
{\noindent\setlength\parfillskip{0pt plus 1fil}\rule{\textwidth}{.4pt}\par}%
}
\begin{document}
\tableofcontents
\chapter{Ten}
\lipsum
\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\lipsum
\end{document}


It works even if you set an option like parskip=half or parskip=full.
Update regarding a comment below
If you want to color the line below the chapter title, define a color and use it for the rule:
...
\colorlet{felinerule}{red}
...
... \textcolor{felinerule}{\rule{\textwidth}{.4pt}} ...
...
And if only numbered chapters should use the changed layout:
\documentclass
%[parskip=half]
{scrreprt}
\usepackage{lipsum}% only for dummy text
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{etoolbox}
\colorlet{feline}{darkgray}% change the color of chapter numbers here
\colorlet{felinerule}{red}
\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\setlength{\fboxsep}{0pt}%
\colorbox{white}{\color{feline}\usefont{U}{eur}{m}{n}\thechapter}}}% change the font of chapter numbers here
\raisebox{\depth}{\usebox{\feline@chapter}}%
}
\renewcommand*{\chapterformat}{%
\sbox\feline@chapter{\feline@chapter@marker[1.61cm]}% adjust the height of chapter numbers here
\makebox[0pt][l]{%
\makebox[\textwidth][r]{%
\usebox\feline@chapter}}%
}
\newif\ifchapterrule
\renewcommand\chapterlinesformat[3]{%
\global\chapterrulefalse
\Ifstr{#1}{chapter}
{\IfArgIsEmpty{#2}
{@hangfrom{#2}{#3}}% unnumbered chapters: original definition
{#2\parbox[b]{\dimexpr\textwidth-\wd\feline@chapter-1em\relax}{\raggedchapter #3}%
\IfArgIsEmpty{#2}{}{\global\chapterruletrue}%
}%
}
{@hangfrom{#2}{#3}}% other sectioning levels with style=chapter: original definition
}
\makeatother
\preto\chapterheadendvskip{%
\ifchapterrule
\vspace*{-\parskip}%
{\noindent\setlength\parfillskip{0pt plus 1fil}\textcolor{felinerule}{\rule{\textwidth}{.4pt}}\par}%
\fi
}
\begin{document}
\tableofcontents
\chapter{Ten}
\lipsum
\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit}
\lipsum
\end{document}

titleps, which does the same job asfancyhdr(in a simpler way, i.m.o.), which is loaded if you use the[pagestyle]option of titlesec. – Bernard Jan 21 '21 at 12:44titlesecis not really compatible withscrreprt. – egreg Jan 25 '21 at 15:14