There is a panel which have display: flex
.panel {
display: flex;
flex-wrap: nowrap;
justify-content: flex-end;
column-gap: 2rem;
overflow-x: auto;
overflow-y: hidden;
width: 100%;
background-color: red;
}
Other elements may appear in it, which are also display: flex; (now it's 1 and 2)

.filter {
display: flex;
flex-wrap: nowrap;
align-items: center;
background-color: #ccc;
outline: 1px solid green;
button {
flex-shrink: 0;
&:not(:last-of-type) {
margin-right: 0.5rem;
}
}
}
When overflowing, scrolling should appear. It appears, but the elements overlap each other.

If you add flex-shrink to them: 0; then the overlay disappears, but the horizontal scrolling disappears.
.filter {
flex-shrink: 0; // +
display: flex;
flex-wrap: nowrap;
align-items: center;
background-color: #ccc;
outline: 1px solid green;
}
How fix this issue?
