Plots not working when using PackageCompiler

I have a very simple piece of code:

using Plots
x=[1,2,3,4,5]
y=[1,2,3,4,5]
plot(x,y)

Works fine.

When I now use a system image it stops to work. Instead of a plot window I get the text output:

Plot{Plots.GRBackend() n=1}

This was not the case with older versions of Plots.

Any idea?

I am using Julia 1.8.5 on Linux and the package GitHub - ufechner7/KiteModels.jl: Kite and tether models for the simulation of kite power systems .

I create the system image with the script KiteModels.jl/create_sys_image at main · ufechner7/KiteModels.jl · GitHub .

Used packages:

(jl_h579yr) pkg> st
Status `/tmp/jl_h579yr/Project.toml`
  [c59cac55] AtmosphericModels v0.1.4
  [6e4b80f9] BenchmarkTools v1.3.2
  [39dd38d3] Dierckx v0.5.2
⌅ [ffbed154] DocStringExtensions v0.8.6
  [e30172f5] Documenter v0.27.24
  [b94af626] KiteModels v0.4.3 `~/repos/KiteModels`
  [9de5dc81] KitePodModels v0.2.0
  [90980105] KiteUtils v0.4.8
  [2774e3e8] NLsolve v4.5.1
  [9b87118b] PackageCompiler v2.1.5
  [d96e819e] Parameters v0.12.3
  [91a5bcdd] Plots v1.38.5
  [189a3867] Reexport v1.2.2
  [6038ab10] Rotations v1.3.4
  [90137ffa] StaticArrays v1.5.14
⌅ [c3572dad] Sundials v4.11.4
⌅ [1e6cf692] TestEnv v1.9.3
  [7dcfa46b] WinchModels v0.1.1
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [8dfed614] Test `@stdlib/Test`

How can I fix this issue?

I created a bug report: Example for creating image with Plots.jl not working · Issue #786 · JuliaLang/PackageCompiler.jl · GitHub